# 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.1635 -> 1.1636 # drivers/scsi/Kconfig 1.58 -> 1.59 # drivers/scsi/qla1280.c 1.55 -> 1.56 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/03/04 mort@green.i.bork.org 1.1636 # SPI transport attributes for qla1280 # -------------------------------------------- # diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig Thu Mar 4 10:57:37 2004 +++ b/drivers/scsi/Kconfig Thu Mar 4 10:57:37 2004 @@ -1193,7 +1193,7 @@ config SCSI_QLOGIC_1280 tristate "Qlogic QLA 1280 SCSI support" - depends on PCI && SCSI + depends on PCI && SCSI && SCSI_SPI_ATTRS help Say Y if you have a QLogic ISP1x80/1x160 SCSI host adapter. diff -Nru a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c --- a/drivers/scsi/qla1280.c Thu Mar 4 10:57:37 2004 +++ b/drivers/scsi/qla1280.c Thu Mar 4 10:57:37 2004 @@ -353,6 +353,8 @@ #include #include #include +#include +#include #include "scsi.h" #else #include @@ -1447,6 +1449,7 @@ int status = 0; struct nvram *nv; unsigned long flags; + int is1x160; ha = (struct scsi_qla_host *)device->host->hostdata; nv = &ha->nvram; @@ -1454,6 +1457,12 @@ if (qla1280_check_for_dead_scsi_bus(ha, bus)) return 1; + if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 || + ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) + is1x160 = 1; + else + is1x160 = 0; + if (device->tagged_supported && (ha->bus_settings[bus].qtag_enables & (BIT_0 << target))) { scsi_adjust_queue_depth(device, MSG_ORDERED_TAG, @@ -1489,6 +1498,15 @@ status = qla1280_set_target_parameters(ha, bus, target); qla1280_get_target_parameters(ha, device); spin_unlock_irqrestore(HOST_LOCK, flags); + + spi_period(device) = nv->bus[bus].target[target].sync_period; + if (is1x160) + spi_offset(device) = nv->bus[bus].target[target].flags. + flags1x160.sync_offset; + else + spi_offset(device) = nv->bus[bus].target[target].flags. + flags1x80.sync_offset; + return status; } @@ -4755,6 +4773,7 @@ host->max_id = MAX_TARGETS; host->max_sectors = 1024; host->unique_id = host->host_no; + host->transportt = &spi_transport_template; #if LINUX_VERSION_CODE < 0x020545 host->select_queue_depths = qla1280_select_queue_depth;