# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.754 -> 1.755 # drivers/scsi/ips.c 1.26 -> 1.27 # drivers/scsi/ips.h 1.9 -> 1.10 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/10/11 dledford@aladin.rdu.redhat.com 1.755 # Make the rest of the world happy with ips again # -------------------------------------------- # diff -Nru a/drivers/scsi/ips.c b/drivers/scsi/ips.c --- a/drivers/scsi/ips.c Fri Oct 11 14:28:18 2002 +++ b/drivers/scsi/ips.c Fri Oct 11 14:28:18 2002 @@ -433,6 +433,7 @@ int ips_eh_reset(Scsi_Cmnd *); int ips_queue(Scsi_Cmnd *, void (*) (Scsi_Cmnd *)); int ips_biosparam(Disk *, struct block_device *, int *); +int ips_slave_attach(Scsi_Device *); const char * ips_info(struct Scsi_Host *); void do_ipsintr(int, void *, struct pt_regs *); static int ips_hainit(ips_ha_t *); @@ -481,7 +482,7 @@ static void ips_free_flash_copperhead(ips_ha_t *ha); static void ips_get_bios_version(ips_ha_t *, int); static void ips_identify_controller(ips_ha_t *); -static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *); +//static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *); static void ips_chkstatus(ips_ha_t *, IPS_STATUS *); static void ips_enable_int_copperhead(ips_ha_t *); static void ips_enable_int_copperhead_memio(ips_ha_t *); @@ -1087,7 +1088,7 @@ sh->n_io_port = io_addr ? 255 : 0; sh->unique_id = (io_addr) ? io_addr : mem_addr; sh->irq = irq; - sh->select_queue_depths = ips_select_queue_depth; + //sh->select_queue_depths = ips_select_queue_depth; sh->sg_tablesize = sh->hostt->sg_tablesize; sh->can_queue = sh->hostt->can_queue; sh->cmd_per_lun = sh->hostt->cmd_per_lun; @@ -1827,7 +1828,7 @@ /* Select queue depths for the devices on the contoller */ /* */ /****************************************************************************/ -static void +/*static void ips_select_queue_depth(struct Scsi_Host *host, Scsi_Device *scsi_devs) { Scsi_Device *device; ips_ha_t *ha; @@ -1860,6 +1861,30 @@ } } } +*/ + +/****************************************************************************/ +/* */ +/* Routine Name: ips_slave_attach */ +/* */ +/* Routine Description: */ +/* */ +/* Set queue depths on devices once scan is complete */ +/* */ +/****************************************************************************/ +int +ips_slave_attach(Scsi_Device *SDptr) +{ + ips_ha_t *ha; + int min; + + ha = IPS_HA(SDptr->host); + min = ha->max_cmds / 4; + if (min < 8) + min = ha->max_cmds - 1; + scsi_adjust_queue_depth(SDptr, MSG_ORDERED_TAG, min); + return 0; +} /****************************************************************************/ /* */ @@ -7407,7 +7432,7 @@ sh->n_io_port = io_addr ? 255 : 0; sh->unique_id = (io_addr) ? io_addr : mem_addr; sh->irq = irq; - sh->select_queue_depths = ips_select_queue_depth; + //sh->select_queue_depths = ips_select_queue_depth; sh->sg_tablesize = sh->hostt->sg_tablesize; sh->can_queue = sh->hostt->can_queue; sh->cmd_per_lun = sh->hostt->cmd_per_lun; diff -Nru a/drivers/scsi/ips.h b/drivers/scsi/ips.h --- a/drivers/scsi/ips.h Fri Oct 11 14:28:18 2002 +++ b/drivers/scsi/ips.h Fri Oct 11 14:28:18 2002 @@ -60,6 +60,7 @@ extern int ips_eh_reset(Scsi_Cmnd *); extern int ips_queue(Scsi_Cmnd *, void (*) (Scsi_Cmnd *)); extern int ips_biosparam(Disk *, struct block_device *, int *); + extern int ips_slave_attach(Scsi_Device *); extern const char * ips_info(struct Scsi_Host *); extern void do_ips(int, void *, struct pt_regs *); @@ -481,7 +482,8 @@ eh_host_reset_handler : ips_eh_reset, \ abort : NULL, \ reset : NULL, \ - slave_attach : NULL, \ + slave_attach : ips_slave_attach, \ + slave_detach : NULL, \ bios_param : ips_biosparam, \ can_queue : 0, \ this_id: -1, \