int targ; int maxtarg; int maxlun; int clun; int count;  if (tag != SCB_LIST_NULL) return (0);  targ = 0; if (target != CAM_TARGET_WILDCARD) { targ = target; maxtarg = targ + 1; } else { maxtarg = (ahd->features & AHD_WIDE) ? 16 : 8; } clun = 0; if (lun != CAM_LUN_WILDCARD) { clun = lun; maxlun = clun + 1; } else { maxlun = AHD_NUM_LUNS; }  count = 0; for (; targ < maxtarg; targ++) {  for (; clun < maxlun; clun++) { struct ahd_linux_device *dev; struct ahd_busyq *busyq; struct ahd_cmd *acmd;  dev = ahd_linux_get_device(ahd, /*chan*/0, targ, clun, /*alloc*/FALSE); if (dev == NULL) continue;  busyq = &dev->busyq; while ((acmd = TAILQ_FIRST(busyq)) != NULL) { Scsi_Cmnd *cmd;  cmd = &acmd_scsi_cmd(acmd); TAILQ_REMOVE(busyq, acmd, acmd_links.tqe); count++; cmd->result = status << 16; ahd_linux_queue_cmd_complete(ahd, cmd); } } }  return (count); 
return 0; 
ahd_platform_abort_scbs(struct ahd_softc *ahd, int target, char channel,			int lun, u_int tag, role_t role, uint32_t status){	int targ;	int maxtarg;	int maxlun;	int clun;	int count;	if (tag != SCB_LIST_NULL)		return (0);	targ = 0;	if (target != CAM_TARGET_WILDCARD) {		targ = target;		maxtarg = targ + 1;	} else {		maxtarg = (ahd->features & AHD_WIDE) ? 16 : 8;	}	clun = 0;	if (lun != CAM_LUN_WILDCARD) {		clun = lun;		maxlun = clun + 1;	} else {		maxlun = AHD_NUM_LUNS;	}	count = 0;	for (; targ < maxtarg; targ++) {		for (; clun < maxlun; clun++) {			struct ahd_linux_device *dev;			struct ahd_busyq *busyq;			struct ahd_cmd *acmd;			dev = ahd_linux_get_device(ahd, /*chan*/0, targ,						   clun, /*alloc*/FALSE);			if (dev == NULL)				continue;			busyq = &dev->busyq;			while ((acmd = TAILQ_FIRST(busyq)) != NULL) {				Scsi_Cmnd *cmd;				cmd = &acmd_scsi_cmd(acmd);				TAILQ_REMOVE(busyq, acmd,					     acmd_links.tqe);				count++;				cmd->result = status << 16;				ahd_linux_queue_cmd_complete(ahd, cmd);			}		}	}	return (count);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60a13213840296b1e32d6781653a0eaa83d04382/aic79xx_osm.c/clean/drivers/scsi/aic7xxx/aic79xx_osm.c