Skip to contentSkip to conversation

queued patches for SCSI for 2.6.24

DISCUSSION James Bottomley 8 participants 20 messages Sep 26, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

James

---

Adrian Bunk (2):
make scsi_decode_sense_buffer and scsi_decode_sense_extras static scsi_error.c should #include "scsi_transport_api.h"

Alan Cox (3):
dtc: Fix typo
eata_pio: Clean up proc handling, bracketing and use cpu_relax()
dtc: clean up indent damage and add printk levels

Andrew Morton (3):
ips: warning fix
aacraid: rename check_reset
bsg: declare structures for the non BSG case

Andrew Vasquez (15):
qla2xxx: Update version number to 8.02.00-k4.
qla2xxx: Limit iIDMA speed adjustments.
qla2xxx: Rework MSI-X handlers.
qla2xxx: Clear options-flags while staging firmware-execution.
qla2xxx: Sparse cleanups in qla_mid.c
qla2xxx: Cleanup several 'sparse' warnings.
qla2xxx: Use shost_priv().
qla2xxx: Remove unused member (list) from srb_t structure.
qla2xxx: Use the correct pointer-address during NVRAM writes.
qla2xxx: Set correct attribute count during FDMI RPA.
qla2xxx: Query additional RISC registers during ISP25XX firmware dump.
qla2xxx: Correct staging of RISC while attempting to pause.
qla2xxx: Query additional RISC information during a pause.
qla2xxx: Add flash burst-read/write support.
qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Bartlomiej Zolnierkiewicz (1):
MAINTAINERS: mark ide-scsi as Orphan

Bernhard Walle (1):
ips: Update version information

Boaz Harrosh (2):
ide-scsi.: convert to data accessors and !use_sg cleanup
microtek: use data accessors and !use_sg cleanup

Christof Schmitt (5):
zfcp: Enable debug feature before setting adapter online
scsi_transport_fc: Introduce disable_target_scan flag
zfcp: Remove braces for only one statement
zfcp: Remove unnecessary assignment
zfcp: correct indentation for nested if-else

David Miller (1):
esp: fix instance numbering.

David Woodhouse (1):
Fix ibmvscsi client for multiplatform iSeries+pSeries kernel

Eric Moore (10):
MAINTAINERS : mpt fusion mailing list change
mpt fusion: bump version to 3.04.06
mpt fusion: Kconfig cleanup
mpt fusion: removing Dell copyright
mpt fusion: removing references to hd->ioc
mpt fusion: rename vdev to vdevice
mpt fusion: adding/removing white space
mpt fusion: standardize printks and debug info mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030 Addition to pci_ids.h for ATTO Technology, Inc.

FUJITA Tomonori (17):
srp_transport: convert to use supported_mode attribute
fc_transport: add target driver support
add supported_mode and active_mode attributes to the host
tgt: fix can_queue bug
fc4: convert to use the data buffer accessors
sg: increase sglist_len of the sg_scatter_hold structure
ps3rom: convert to use the data buffer accessors
scsi_transport_srp: remove tgt dependencies
tgt: convert ibmvstgt to use transport tsk_mgmt_response callback
tgt: move tsk_mgmt_response callback to transport class
tgt: convert libsrp and ibmvstgt to use srp_transport
srp_transport: add target driver support
tgt: add I_T nexus support
transport_srp: add rport roles attribute
ib_srp: convert to use the srp transport class
ibmvscsi: convert to use the srp transport class
add srp transport class

Gabriel C (1):
NCR5380: fix NCR53C400_PSEUDO_DMA is not defined

Gilbert Wu (1):
aic94xx: Add new PCI ID for ASC58300

Heiko Carstens (3):
zfcp: avoid if (whatever) ; constructs.
zfcp: allocate gid_pn_data objects from gid_pn_cache.
zfcp: fix memory leak.

HighPoint Linux Team (1):
hptiop: adding new firmware interface and more PCI device IDs

James Bottomley (3):
sg: use idr to replace static arrays
move ULD attachment into the prep function
arcmsr: fix compile problems

Jan Engelhardt (1):
mpt fusion: Use menuconfig objects

Jeff Garzik (2):
arcmsr: irq handler fixes, cleanups, micro-opts
arcmsr: Fix hardware wait loops

Jesper Juhl (3):
mpt fusion: fix two potential mem leaks
NCR_D700, lpfc: Clean up duplicate includes
lpfc: fix potential overflow of hbqs array

Joe Carnuccio (1):
qla2xxx: Allow region-based flash-part accesses.

Kay Sievers (1):
switch sdev sysfs attributes to default attributes

Mariusz Kozlowski (3):
mpt fusion: remove redundant memset
mpt fusion: mostly kmalloc + memset conversion to kzalloc kmalloc + memset conversion to kzalloc

Masatake YAMATO (1):
Fix signness of parameters in scsi module

Matthew Wilcox (49):
ips: Close narrow race in release
aic94xx: Free scsi host on error
simscsi: Free scsi host on error
qlogicfas: Close narrow race in release
aha152x: Close narrow race in release
ncr53c8xx: Call scsi_host_put in release
ide-scsi: Close narrow race in release
ibmmca: Stop leaking scsi_hosts on exit
scsi_scan: Cope with kthread_run failing
Improve error message when offlining a device
advansys: Use DRV_NAME
advansys: Comment/indentation/macro cleanup
advansys: Remove some custom wrappers
advansys: Remove a check for an impossible condition
advansys: Support 16-byte commands properly
advansys: Enable interrupts earlier in queuecommand
advansys: Remove `active' queue and all remaining internal queueing code
advansys: Remove `done' queue
advansys: Remove a check for an impossible condition
advansys: Remove `waiting' queue
advansys: Shrink advansys_board_found a little more
advansys: Reformat microcode
advansys: Create AdvLoadMicrocode
advansys: Create AdvBuildCarrierFreelist
advansys: Fix VLB driver name
advansys: Move documentation to Documentation/scsi
advansys: use memcpy instead of open-coded loop
advansys: Remove pci_slot_info
advansys: Remove library-style callback routines
advansys: Move struct device out of the cfg structures
advansys: Stop using n_io_port in Scsi_Host structure
advansys: ioremap no longer needs page-aligned addresses
advansys: delete AscGetChipBusType
advansys: misc reformatting
advansys: remove INQUIRY sniffing
Add QUANTUM XP34301 to the blacklist
advansys: remove AscCompareString()
advansys: More PCI cleanups
advansys: Update resource management
advansys: Convert to ISA driver model
advansys: Convert to EISA driver model
advansys: Convert to PCI driver model
advansys: Move to scsi hotplug initialisation model
advansys: Make advansys_board_found a little more readable
advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host
advansys: Improve interrupt handler
advansys: Clean up proc_info implementation
advansys: undate version, copyright, etc
Fix async scanning double-add problems

Matthias Kaehlcke (1):
osst: Use mutex instead of semaphore

Michael Reed (1):
stale residual returned on write following BUSY retry

Mike Christie (1):
fix write buffer length in scsi_req_map_sg()

Nick Cheng (1):
arcmsr: 1.20.00.15: add SATA RAID plus other fixes

Prakash, Sathya (5):
mpt fusion: Change company name from LSI Logic to LSI
mpt fusion: Link speed change display support
mpt fusion: Creation of mptsas.h header file
mpt fusion: Change call back indices to u8 from int
mpt fusion: Usage of high priority request FIFO to send task management commands

Ravi Anand (1):
qla2xxx: Correct infinite-login-retry issue.

Salyzyn, Mark (1):
aacraid: Add documentation for new Adaptec, SMC and SUN cards

Seokmann Ju (2):
qla2xxx: Retrieve max-NPIV support capabilities from FW.
qla2xxx: Add PCI error recovery support.

Swen Schillig (2):
zfcp: whitespace cleanup
zfcp: cleanup, separation of ERP, non ERP-version for exchange_ functions

#1 lore raw

From: James Bottomley <[email protected]>
Date: Tue, 25 Sep 2007 20:00:02 -0500

Quoted 2 lines

David Miller (1):
esp: fix instance numbering.

I'd like to request that this one goes into 2.6.23 as it is a bug fix and the bug confuses users.

Thanks.

#2 lore raw
In reply to James Bottomley
Quoted 216 lines · James Bottomley

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

James

---

Adrian Bunk (2):
make scsi_decode_sense_buffer and scsi_decode_sense_extras static scsi_error.c should #include "scsi_transport_api.h"

Alan Cox (3):
dtc: Fix typo
eata_pio: Clean up proc handling, bracketing and use cpu_relax()
dtc: clean up indent damage and add printk levels

Andrew Morton (3):
ips: warning fix
aacraid: rename check_reset
bsg: declare structures for the non BSG case

Andrew Vasquez (15):
qla2xxx: Update version number to 8.02.00-k4.
qla2xxx: Limit iIDMA speed adjustments.
qla2xxx: Rework MSI-X handlers.
qla2xxx: Clear options-flags while staging firmware-execution.
qla2xxx: Sparse cleanups in qla_mid.c
qla2xxx: Cleanup several 'sparse' warnings.
qla2xxx: Use shost_priv().
qla2xxx: Remove unused member (list) from srb_t structure.
qla2xxx: Use the correct pointer-address during NVRAM writes.
qla2xxx: Set correct attribute count during FDMI RPA.
qla2xxx: Query additional RISC registers during ISP25XX firmware dump.
qla2xxx: Correct staging of RISC while attempting to pause.
qla2xxx: Query additional RISC information during a pause.
qla2xxx: Add flash burst-read/write support.
qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Bartlomiej Zolnierkiewicz (1):
MAINTAINERS: mark ide-scsi as Orphan

Bernhard Walle (1):
ips: Update version information

Boaz Harrosh (2):
ide-scsi.: convert to data accessors and !use_sg cleanup
microtek: use data accessors and !use_sg cleanup

Christof Schmitt (5):
zfcp: Enable debug feature before setting adapter online
scsi_transport_fc: Introduce disable_target_scan flag
zfcp: Remove braces for only one statement
zfcp: Remove unnecessary assignment
zfcp: correct indentation for nested if-else

David Miller (1):
esp: fix instance numbering.

David Woodhouse (1):
Fix ibmvscsi client for multiplatform iSeries+pSeries kernel

Eric Moore (10):
MAINTAINERS : mpt fusion mailing list change
mpt fusion: bump version to 3.04.06
mpt fusion: Kconfig cleanup
mpt fusion: removing Dell copyright
mpt fusion: removing references to hd->ioc
mpt fusion: rename vdev to vdevice
mpt fusion: adding/removing white space
mpt fusion: standardize printks and debug info mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030 Addition to pci_ids.h for ATTO Technology, Inc.

FUJITA Tomonori (17):
srp_transport: convert to use supported_mode attribute
fc_transport: add target driver support
add supported_mode and active_mode attributes to the host
tgt: fix can_queue bug
fc4: convert to use the data buffer accessors
sg: increase sglist_len of the sg_scatter_hold structure
ps3rom: convert to use the data buffer accessors
scsi_transport_srp: remove tgt dependencies
tgt: convert ibmvstgt to use transport tsk_mgmt_response callback
tgt: move tsk_mgmt_response callback to transport class
tgt: convert libsrp and ibmvstgt to use srp_transport
srp_transport: add target driver support
tgt: add I_T nexus support
transport_srp: add rport roles attribute
ib_srp: convert to use the srp transport class
ibmvscsi: convert to use the srp transport class
add srp transport class

Gabriel C (1):
NCR5380: fix NCR53C400_PSEUDO_DMA is not defined

Gilbert Wu (1):
aic94xx: Add new PCI ID for ASC58300

Heiko Carstens (3):
zfcp: avoid if (whatever) ; constructs.
zfcp: allocate gid_pn_data objects from gid_pn_cache.
zfcp: fix memory leak.

HighPoint Linux Team (1):
hptiop: adding new firmware interface and more PCI device IDs

James Bottomley (3):
sg: use idr to replace static arrays
move ULD attachment into the prep function
arcmsr: fix compile problems

Jan Engelhardt (1):
mpt fusion: Use menuconfig objects

Jeff Garzik (2):
arcmsr: irq handler fixes, cleanups, micro-opts
arcmsr: Fix hardware wait loops

Jesper Juhl (3):
mpt fusion: fix two potential mem leaks
NCR_D700, lpfc: Clean up duplicate includes
lpfc: fix potential overflow of hbqs array

Joe Carnuccio (1):
qla2xxx: Allow region-based flash-part accesses.

Kay Sievers (1):
switch sdev sysfs attributes to default attributes

Mariusz Kozlowski (3):
mpt fusion: remove redundant memset
mpt fusion: mostly kmalloc + memset conversion to kzalloc kmalloc + memset conversion to kzalloc

Masatake YAMATO (1):
Fix signness of parameters in scsi module

Matthew Wilcox (49):
ips: Close narrow race in release
aic94xx: Free scsi host on error
simscsi: Free scsi host on error
qlogicfas: Close narrow race in release
aha152x: Close narrow race in release
ncr53c8xx: Call scsi_host_put in release
ide-scsi: Close narrow race in release
ibmmca: Stop leaking scsi_hosts on exit
scsi_scan: Cope with kthread_run failing
Improve error message when offlining a device
advansys: Use DRV_NAME
advansys: Comment/indentation/macro cleanup
advansys: Remove some custom wrappers
advansys: Remove a check for an impossible condition
advansys: Support 16-byte commands properly
advansys: Enable interrupts earlier in queuecommand
advansys: Remove `active' queue and all remaining internal queueing code
advansys: Remove `done' queue
advansys: Remove a check for an impossible condition
advansys: Remove `waiting' queue
advansys: Shrink advansys_board_found a little more
advansys: Reformat microcode
advansys: Create AdvLoadMicrocode
advansys: Create AdvBuildCarrierFreelist
advansys: Fix VLB driver name
advansys: Move documentation to Documentation/scsi
advansys: use memcpy instead of open-coded loop
advansys: Remove pci_slot_info
advansys: Remove library-style callback routines
advansys: Move struct device out of the cfg structures
advansys: Stop using n_io_port in Scsi_Host structure
advansys: ioremap no longer needs page-aligned addresses
advansys: delete AscGetChipBusType
advansys: misc reformatting
advansys: remove INQUIRY sniffing
Add QUANTUM XP34301 to the blacklist
advansys: remove AscCompareString()
advansys: More PCI cleanups
advansys: Update resource management
advansys: Convert to ISA driver model
advansys: Convert to EISA driver model
advansys: Convert to PCI driver model
advansys: Move to scsi hotplug initialisation model
advansys: Make advansys_board_found a little more readable
advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host
advansys: Improve interrupt handler
advansys: Clean up proc_info implementation
advansys: undate version, copyright, etc
Fix async scanning double-add problems

Matthias Kaehlcke (1):
osst: Use mutex instead of semaphore

Michael Reed (1):
stale residual returned on write following BUSY retry

Mike Christie (1):
fix write buffer length in scsi_req_map_sg()

Nick Cheng (1):
arcmsr: 1.20.00.15: add SATA RAID plus other fixes

Prakash, Sathya (5):
mpt fusion: Change company name from LSI Logic to LSI
mpt fusion: Link speed change display support
mpt fusion: Creation of mptsas.h header file
mpt fusion: Change call back indices to u8 from int
mpt fusion: Usage of high priority request FIFO to send task management commands

Ravi Anand (1):
qla2xxx: Correct infinite-login-retry issue.

Salyzyn, Mark (1):
aacraid: Add documentation for new Adaptec, SMC and SUN cards

Quoted 8 lines

Seokmann Ju (2):
qla2xxx: Retrieve max-NPIV support capabilities from FW.
qla2xxx: Add PCI error recovery support.

Swen Schillig (2):
zfcp: whitespace cleanup
zfcp: cleanup, separation of ERP, non ERP-version for exchange_ functions

Will you not have time to review the scsi_error patches? They are independent of the drivers, and will enable usb patches to go threw their maintainer tree. They establish a new API and fix a minor bug.

Boaz

#3 lore raw
In reply to James Bottomley
Quoted 4 lines · On Tue, 25 Sep 2007 20:00:02 -0500 James Bottomley…

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

Can we make new 'supporrted_mode' and 'active_mode' attributes look better?

http://marc.info/?l=linux-scsi&m=118991196128245&w=2

#4 lore raw
Quoted 8 lines · FUJITA Tomonori
Quoted 4 lines · On Tue, 25 Sep 2007 20:00:02 -0500 James Bottomley…

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

Quoted 4 lines

Can we make new 'supporrted_mode' and 'active_mode' attributes look better?

http://marc.info/?l=linux-scsi&m=118991196128245&w=2

Sure, but Jeff's suggestion was a good one to avoid me having to change hundreds of files. Could you roll it up and resubmit?

James

#5 lore raw
Quoted 9 lines · On Tue, 25 Sep 2007 20:42:35 -0500 James Bottomley…
Quoted 8 lines · FUJITA Tomonori
Quoted 4 lines · On Tue, 25 Sep 2007 20:00:02 -0500 James Bottomley…

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

Quoted 7 lines
Quoted 4 lines

Can we make new 'supporrted_mode' and 'active_mode' attributes look better?

http://marc.info/?l=linux-scsi&m=118991196128245&w=2

Sure, but Jeff's suggestion was a good one to avoid me having to change hundreds of files. Could you roll it up and resubmit?

This can be cleanly applied to scsi-misc.

-
From: FUJITA Tomonori <[email protected]>
Subject: [PATCH] set supported_mode to MODE_INITIATOR by default

This sets supported_mode to MODE_INITIATOR if a lld doesn't specify supported_mode in scsi_host_template.

---
 drivers/scsi/hosts.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/scsi/hosts.c +4 -0
index adc9559..694015d 100644
@@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
+
+	if (!sht->supported_mode)
+		sht->supported_mode = MODE_INITIATOR;
+
 	shost->active_mode = sht->supported_mode;
 
 	if (sht->max_host_blocked)
Signature · 1 line
1.5.2.4
#6 lore raw

drivers/scsi/hosts.c struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) · line 349

Quoted 13 lines · FUJITA Tomonori
drivers/scsi/hosts.c +4 -0
index adc9559..694015d 100644
@@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
+
+	if (!sht->supported_mode)
+		sht->supported_mode = MODE_INITIATOR;
+
 	shost->active_mode = sht->supported_mode;

I almost hesitate to speak up, after making the original suggestion, but:

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Perhaps this value should instead be mirrored in scsi_host, like many others?

Jeff

#7 lore raw
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
#8 lore raw
Quoted 7 lines · Matthew Wilcox
Quoted 1 line · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Jeff

#9 lore raw
Quoted 5 lines · Jeff Garzik

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Oh ... harder to find, but scsi_module.c does that, as does scsi_register/scsi_unregister. OK, those are legacy, but they still exist today.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
#10 lore raw
In reply to Jeff Garzik
Quoted 11 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Quoted 5 lines

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

James

drivers/scsi/hosts.c +5 -1
index adc9559..7e26440 100644
@@ -342,7 +342,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
-	shost->active_mode = sht->supported_mode;
+	if (sht->supported_mode == MODE_UNKNOWN)
+		/* means we didn't set it ... default to INITIATOR */
+		shost->active_mode = MODE_INITIATOR;
+	else
+		shost->active_mode = sht->supported_mode;
 
 	if (sht->max_host_blocked)
 		shost->max_host_blocked = sht->max_host_blocked;
drivers/scsi/scsi_sysfs.c +6 -4
index 0088c4d..4965e9e 100644
@@ -209,11 +209,13 @@ show_shost_mode(unsigned int mode, char *buf)
 static ssize_t show_shost_supported_mode(struct class_device *class_dev, char *buf)
 {
 	struct Scsi_Host *shost = class_to_shost(class_dev);
+	unsigned int supported_mode = shost->hostt->supported_mode;
 
-	if (shost->hostt->supported_mode == MODE_UNKNOWN)
-		return snprintf(buf, 20, "unknown\n");
-	else
-		return show_shost_mode(shost->hostt->supported_mode, buf);
+	if (supported_mode == MODE_UNKNOWN)
+		/* by default this should be initiator */
+		supported_mode = MODE_INITIATOR;
+
+	return show_shost_mode(shost->hostt->supported_mode, buf);
 }
 
 static CLASS_DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);
#11 lore raw
Quoted 35 lines · James Bottomley

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

James

drivers/scsi/hosts.c +5 -1
index adc9559..7e26440 100644
@@ -342,7 +342,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
-	shost->active_mode = sht->supported_mode;
+	if (sht->supported_mode == MODE_UNKNOWN)
+		/* means we didn't set it ... default to INITIATOR */
+		shost->active_mode = MODE_INITIATOR;
+	else
+		shost->active_mode = sht->supported_mode;
 
 	if (sht->max_host_blocked)
 		shost->max_host_blocked = sht->max_host_blocked;
drivers/scsi/scsi_sysfs.c +1 -2
index 0088c4d..4965e9e 100644
@@ -209,11 +209,13 @@ show_shost_mode(unsigned int mode, char *buf)
 static ssize_t show_shost_supported_mode(struct class_device *class_dev, char *buf)
 {
 	struct Scsi_Host *shost = class_to_shost(class_dev);
+	unsigned int supported_mode = shost->hostt->supported_mode;
 
-	if (shost->hostt->supported_mode == MODE_UNKNOWN)
-		return snprintf(buf, 20, "unknown\n");

drivers/scsi/scsi_sysfs.c show_shost_mode(unsigned int mode, char *buf) · line 221

Quoted 10 lines
drivers/scsi/scsi_sysfs.c +5 -2
-	else
-		return show_shost_mode(shost->hostt->supported_mode, buf);
+	if (supported_mode == MODE_UNKNOWN)
+		/* by default this should be initiator */
+		supported_mode = MODE_INITIATOR;
+
+	return show_shost_mode(shost->hostt->supported_mode, buf);
 }
 
 static CLASS_DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);

ACK

#12 lore raw
In reply to James Bottomley
Quoted 16 lines · On Tue, 25 Sep 2007 22:45:53 -0500 James Bottomley…
Quoted 15 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Well, sure, the driver is the owner of that memory.

We're talking about common code.

Quoted 7 lines
Quoted 1 line

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

But how can we handle dual-mode drivers?

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator, Target

The values are not enumerated. They are like FC_PORT_ROLE.

#13 lore raw
Quoted 27 lines · FUJITA Tomonori
Quoted 16 lines · On Tue, 25 Sep 2007 22:45:53 -0500 James Bottomley…
Quoted 15 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Well, sure, the driver is the owner of that memory.

We're talking about common code.

Quoted 7 lines
Quoted 1 line

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

Quoted 7 lines

But how can we handle dual-mode drivers?

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator, Target

The values are not enumerated. They are like FC_PORT_ROLE.

Any driver that does other than the default INITIATOR has to set it in the template. The code only defaults zero (which is what the templates get if its unset) to MODE_INITIATOR.

James

#14 lore raw
Quoted 34 lines · On Tue, 25 Sep 2007 23:01:53 -0500 James Bottomley…
Quoted 33 lines · FUJITA Tomonori
Quoted 16 lines · On Tue, 25 Sep 2007 22:45:53 -0500 James Bottomley…
Quoted 15 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Well, sure, the driver is the owner of that memory.

We're talking about common code.

Quoted 7 lines
Quoted 1 line

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

But how can we handle dual-mode drivers?

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator, Target
Quoted 5 lines
Quoted 1 line

The values are not enumerated. They are like FC_PORT_ROLE.

Any driver that does other than the default INITIATOR has to set it in the template. The code only defaults zero (which is what the templates get if its unset) to MODE_INITIATOR.

Oh yeah, the patch is fine.

I just wanted to say that supported_mode/active_mode are designed not to be enumerated and we can't just set INITIATOR to zero and TARGET to non-zero.

#15 lore raw
In reply to James Bottomley
Quoted 52 lines · On Tue, 25 Sep 2007 22:45:53 -0500 James Bottomley…
Quoted 11 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Quoted 5 lines

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

James

drivers/scsi/hosts.c +5 -1
index adc9559..7e26440 100644
@@ -342,7 +342,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
-	shost->active_mode = sht->supported_mode;
+	if (sht->supported_mode == MODE_UNKNOWN)
+		/* means we didn't set it ... default to INITIATOR */
+		shost->active_mode = MODE_INITIATOR;
+	else
+		shost->active_mode = sht->supported_mode;
 
 	if (sht->max_host_blocked)
 		shost->max_host_blocked = sht->max_host_blocked;
drivers/scsi/scsi_sysfs.c +1 -0
index 0088c4d..4965e9e 100644
@@ -209,11 +209,13 @@ show_shost_mode(unsigned int mode, char *buf)
 static ssize_t show_shost_supported_mode(struct class_device *class_dev, char *buf)
 {
 	struct Scsi_Host *shost = class_to_shost(class_dev);
+	unsigned int supported_mode = shost->hostt->supported_mode;

drivers/scsi/scsi_sysfs.c show_shost_mode(unsigned int mode, char *buf) · line 218

Quoted 10 lines
drivers/scsi/scsi_sysfs.c +5 -4
 
-	if (shost->hostt->supported_mode == MODE_UNKNOWN)
-		return snprintf(buf, 20, "unknown\n");
-	else
-		return show_shost_mode(shost->hostt->supported_mode, buf);
+	if (supported_mode == MODE_UNKNOWN)
+		/* by default this should be initiator */
+		supported_mode = MODE_INITIATOR;
+
+	return show_shost_mode(shost->hostt->supported_mode, buf);

should be:

return show_shost_mode(supported_mode, buf);

Quoted 3 lines
drivers/scsi/scsi_sysfs.c +0 -0
 static CLASS_DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);
 
#16 lore raw
Quoted 68 lines · FUJITA Tomonori
Quoted 52 lines · On Tue, 25 Sep 2007 22:45:53 -0500 James Bottomley…
Quoted 11 lines · Jeff Garzik
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Jeff Garzik

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Goodness, Jeff, you haven't looked too hard. There's dozens of examples I've come across trawling the horrible unmaintained drivers. I'd love to see scsi_host_template become const, but it's not happening any time soon, and we can address this little piece when the time comes.

Quoted 5 lines

Well, sure, the driver is the owner of that memory.

We're talking about common code.

If everybody agrees SHT is R/W in the core, Fujita-san's patch is fine.

Well, I don't like mucking with the template either.

This whole mess is generated basically because the zero default of the template should be treated as initiator. How about this, which makes that manifest?

James

drivers/scsi/hosts.c +5 -1
index adc9559..7e26440 100644
@@ -342,7 +342,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
-	shost->active_mode = sht->supported_mode;
+	if (sht->supported_mode == MODE_UNKNOWN)
+		/* means we didn't set it ... default to INITIATOR */
+		shost->active_mode = MODE_INITIATOR;
+	else
+		shost->active_mode = sht->supported_mode;
 
 	if (sht->max_host_blocked)
 		shost->max_host_blocked = sht->max_host_blocked;
drivers/scsi/scsi_sysfs.c +1 -0
index 0088c4d..4965e9e 100644
@@ -209,11 +209,13 @@ show_shost_mode(unsigned int mode, char *buf)
 static ssize_t show_shost_supported_mode(struct class_device *class_dev, char *buf)
 {
 	struct Scsi_Host *shost = class_to_shost(class_dev);
+	unsigned int supported_mode = shost->hostt->supported_mode;

drivers/scsi/scsi_sysfs.c show_shost_mode(unsigned int mode, char *buf) · line 218

Quoted 10 lines
drivers/scsi/scsi_sysfs.c +5 -4
 
-	if (shost->hostt->supported_mode == MODE_UNKNOWN)
-		return snprintf(buf, 20, "unknown\n");
-	else
-		return show_shost_mode(shost->hostt->supported_mode, buf);
+	if (supported_mode == MODE_UNKNOWN)
+		/* by default this should be initiator */
+		supported_mode = MODE_INITIATOR;
+
+	return show_shost_mode(shost->hostt->supported_mode, buf);

should be:

Quoted 1 line

return show_shost_mode(supported_mode, buf);

Yes, sorry ... code in haste etc.

James

#17 lore raw
In reply to Jeff Garzik
Quoted 18 lines · On Tue, 25 Sep 2007 22:37:33 -0400 Jeff Garzik <[email protected]> wrote:

drivers/scsi/hosts.c struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) · line 349

Quoted 13 lines · FUJITA Tomonori
drivers/scsi/hosts.c +4 -0
index adc9559..694015d 100644
@@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
 	shost->unchecked_isa_dma = sht->unchecked_isa_dma;
 	shost->use_clustering = sht->use_clustering;
 	shost->ordered_tag = sht->ordered_tag;
+
+	if (!sht->supported_mode)
+		sht->supported_mode = MODE_INITIATOR;
+
 	shost->active_mode = sht->supported_mode;

I almost hesitate to speak up, after making the original suggestion, but:

Quoted 3 lines

Are there any const-ness worries for scsi_host_template, or plans for the future? I do not see any other examples of the host template members getting modified.

Yeah, that's why I said it's hacky in the previous discussion. Changing scsi_host_template behind llds is not nice, I think.

Quoted 2 lines

Perhaps this value should instead be mirrored in scsi_host, like many others?

supported_mode should be static like 'name'. I'm not sure about having supported_mode in scsi_host. All the scsi_hosts of one driver always use the same supported_mode value unlike active_mode.

#18 lore raw
In reply to James Bottomley
Quoted 5 lines · James Bottomley

Andrew asked that I provide a status report of pending updates. The list is attached below. It's pretty much driver updates and minor bug fixes. The main functionality changes are Kay's sysfs updates and the shift of the ULD attachement towards the block prep function.

[snip]

Just curious: Is the patch for scsi_transport_spi.c you sent me for my hardware problem going to make it into an official kernel?

(Referring to your patch which you posted under:

[PATCH] scsi_transport_spi: fix domain validation failure from incorrect width setting

)

Arguably, it works around a hardware problem of mine, but it could make also for others the differences of a machine not booting at all and one that at least comes up and is usable ...

Sincerely,

Stefan Boresch

Signature · 4 lines
Stefan Boresch
Institute for Computational Biological Chemistry
University of Vienna, Waehringerstr. 17       A-1090 Vienna, Austria
Phone: -43-1-427752715                        Fax:   -43-1-427752790
#19 lore raw
Quoted 2 lines · Stefan Boresch

Just curious: Is the patch for scsi_transport_spi.c you sent me for my hardware problem going to make it into an official kernel?

That patch has been requested to go into 2.6.23, so isn't in this list.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."