aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_spi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-04-27[SCSI] scsi_transport_spi: include sysfs.hRandy Dunlap1-0/+1
scsi_transport_spi.c needs to #include <linux/sysfs.h>: next-20080423/drivers/scsi/scsi_transport_spi.c:1467: error: implicit declaration of function 'sysfs_update_group' make[3]: *** [drivers/scsi/scsi_transport_spi.o] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-22[SCSI] scsi_transport_spi: fix the attribute settingsJames Bottomley1-24/+8
We now take advantage of the mode_t return of is_valid, and also update the attributes when the target is configured. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-04-19SCSI: convert struct class_device to struct deviceTony Jones1-87/+98
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-23[SCSI] scsi_transport_spi: convert to attribute groupsJames Bottomley1-82/+176
This conversion makes full use of the is_visible() callback on attribute groups. Now, each device appears only with its capability flags in the transport class directory. Previously each device appeared with the capability of the host, so this is a functionality improvement. Converting to attribute groups allows us to sweep away most of the home grown #defines that were effectively doing the same thing. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-09-22[SCSI] scsi_transport_spi: fix domain validation failure from incorrect width settingJames Bottomley1-6/+22
Domain Validation in the SPI transport class is failing on boxes with damaged cables (and failing to the extent that the box hangs). The problem is that the first test it does is a cable integrity test for wide transfers and if this fails, it turns the wide bit off. The problem is that the next set of tests it does turns wide back on again, with the result that it runs through the entirety of DV with a known bad setting and then hangs the system. The attached patch fixes the problem by physically nailing the wide setting to what it deduces it should be for the whole of Domain Validation. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-02-02[SCSI] spi transport class: export spi_dv_pendingEric Moore1-1/+0
Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-03[SCSI] scsi_transport_spi: fix sense buffer size errorJames Bottomley1-1/+1
The code does this: unsigned char sense[SCSI_SENSE_BUFFERSIZE]; ... scsi_normalize_sense(sense, sizeof(*sense), sshdr) however the sizeof will return 1 not 96 which means the sense data will have no valid ASC/ASCQ values. Fix by putting the correct sense size. The only affected case for this would have been the DV buffer sanity check failure, which is fortunately quite rare. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-22WorkStruct: make allyesconfigDavid Howells1-3/+4
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-09-23[SCSI] SPI transport class: misc DV fixesJames Bottomley1-7/+23
Key more of the domain validation settings off the inquiry data from the disk (in particular, don't try IU or DT unless the disk claims to support them. Also add a new dv_in_progress flag to prevent recursive DV. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-10[SCSI] spi transport: don't allow dt to be set on SE or HVD busesJames Bottomley1-0/+9
This is really just a belt and braces test. The standards require disks to respond DT not capable on a non-LVD bus ... however, not all disks follow the standards ... Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10[SCSI] drivers/scsi: Use ARRAY_SIZE macroTobias Klauser1-2/+2
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12[SCSI] fix minor problem in spi transport message functionsJames Bottomley1-1/+1
The check for a one byte message should be msg[0] == 0x55 not msg == 0x55 Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12[SCSI] Missing names from SPI3, SPI4 and SPI5Matthew Wilcox1-13/+13
Add several missing messages from SPI3, SPI4 and SPI5: - Terminate Process - Continue Task - Target Transfer Disable - Clear ACA - LUN Reset - ACA - QAS Request Rename some older commands to their SPI5 names: - Command Complete -> Task Complete - Abort -> Abort Task Set - Bus device Reset -> Target Reset - Clear Queue -> Clear Task Set Change spi_print_msg() to always consume one byte, even if we don't recognise it. That allows drivers to call it in a loop to print all messages. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] Improve message printing codeMatthew Wilcox1-5/+19
Fix a bug where we would consume one byte too many in the message printing code. Add support for 256-byte long messages. Add support for the Modify Bidirectional Data Pointer message. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] Add EXPORT_SYMBOL for spi msg functionsJames Bottomley1-0/+3
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] Make spi_print_msg more consistentMatthew Wilcox1-3/+3
Almost all the output from spi_print_msg() has a trailing space. This patch fixes up the three cases that don't. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] Add spi_populate_*_msg functionsMatthew Wilcox1-0/+33
Introduce new helpers: - spi_populate_width_msg() - spi_populate_sync_msg() - spi_populate_ppr_msg() and use them in drivers which already enable the SPI transport. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] unused show_spi_transport_period_helper parameterMatthew Wilcox1-4/+3
show_spi_transport_period_helper() doesn't need the class_device parameter Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27[SCSI] SCSI core kmalloc2kzallocJes Sorensen1-8/+4
Change the core SCSI code to use kzalloc rather than kmalloc+memset where possible. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] sem2mutex: scsi_transport_spi.cJes Sorensen1-5/+5
Convert the SCSI transport class code to use a mutex rather than a semaphore. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] scsi_transport_spi.c: make print_nego() staticAdrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Add PPR support to spi_print_msgMatthew Wilcox1-7/+29
Introduce a new helper, print_nego() to handle SDTR/WDTR/PPR. Split out the guts of show_spi_transport_period_helper() into period_to_str() and use it in print_nego to get the period factor conversion right. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Use ARRAY_SIZE in spi_print_msgMatthew Wilcox1-6/+3
Replace the custom NO_*_MSGS definitions with uses of ARRAY_SIZE. This fixes a bug in the definition of NO_EXTENDED_MSGS. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Fix printing of two-byte messagesMatthew Wilcox1-1/+1
A missing comma meant that "Ordered Queue Tag" and "Ignore Wide Residue" were being concatenated together. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Rename scsi_print_msg to spi_print_msgMatthew Wilcox1-4/+4
Rename scsi_print_msg to spi_print_msg and move its prototype from scsi_dbg.h to scsi_transport_spi.h Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Move scsi_print_msg to SPI classMatthew Wilcox1-0/+109
scsi_print_msg() is an SPI-specific concept. This patch moves it from constants.c to scsi_transport_spi.c and updates the Kconfig to link in the SPI class for the drivers which use scsi_print_msg(). Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Delete trailing full stopMatthew Wilcox1-1/+1
None of the other domain validation messages have a trailing full stop, so I don't see why this one should. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01[SCSI] SPI DV: be more conservative about echo buffer usageJames Bottomley1-9/+19
Some SCSI devices apparently get very confused if we try to use the echo buffer on a non-DT negotiated bus (this mirrors the problems of using PPR on non-LVD for some devices). The fix is to be far more conservative about when we use an echo buffer. With this patch, we'll now see what parameters are negotiated by the read only test, and only look for an echo buffer if DT is negotiated. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28[SCSI] move the mid-layer printk's over to shost/starget/sdev_printkJames Bottomley1-13/+11
This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28[SCSI] comment cleanup for spi_executeChristoph Hellwig1-4/+0
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28[SCSI] convert SPI transport class to scsi_executeJames Bottomley1-67/+57
This one's slightly more difficult. The transport class uses REQ_FAILFAST, so another interface (scsi_execute) had to be invented to take the extra flag. Also, the sense functions are shifted around to allow spi_execute to place data directly into a struct scsi_sense_hdr. With this change, there's probably a lot of unnecessary sense buffer allocation going on which we can fix later. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-14[SCSI] correct transport class abstraction to work outside SCSIJames Bottomley1-3/+8
I recently tried to construct a totally generic transport class and found there were certain features missing from the current abstract transport class. Most notable is that you have to hang the data on the class_device but most of the API is framed in terms of the generic device, not the class_device. These changes are two fold - Provide the class_device to all of the setup and configure APIs - Provide and extra API to take the device and the attribute class and return the corresponding class_device Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-14[SCSI] add ability to deny binding to SPI transport classJames Bottomley1-1/+10
This patch is necessary if we begin exposing underlying physical disks (which can attach to the SPI transport class) of the hardware RAID cards, since we don't want any SPI parameters binding to the RAID devices. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-03[SCSI] add missing hold_mcs parameter to the spi transport classJames Bottomley1-5/+15
This parameter is important only to people who take the time to tune the margin control settings, otherwise it's completely irrelevant. However, just in case anyone should want to do this, it's appropriate to include the parameter. I don't do anything with it in DV by design, so the parameter will come up as off by default, so if anyone actually wants to play with the margin control settings they'll have to enable it under the spi_transport class first. I also updated the transfer settings display to report all of the PPR settings instead of only DT, IU and QAS Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-11[SCSI] SPI transport class, don't negotiate options not supportedJames Bottomley1-5/+8
At the moment, the transport class blindly tries to set things like QAS and IU, even if the drive won't support them. It's best not to annoy the devices like this and instead only set what the drive says is actually supported. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-20[PATCH] use device_for_each_child() to properly access child devices.gregkh@suse.de1-6/+10
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-03[SCSI] update spi transport class so that u320 Domain Validation worksJames Bottomley1-24/+53
There are several extra things that have to be considered when running Domain Validation on a u320 target (notably how you fall back). Hopefully this should help us when someone adds this transport class to aic79xx. I've tested this on the lsi1030, so I know it works correctly up to u320. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] implement parameter limits in the SPI transport classJames Bottomley1-27/+161
There's a basic need not to have parameters go under or over certain values when doing domain validation. The basic ones are max_offset, max_width and min_period This patch makes the transport class take and enforce these three limits. Currently they can be set by the user, although they could obviously be read from the HBA's on-board NVRAM area during slave_configure (if it has one). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-05[SCSI] fix command retries in spi_transport classJames Bottomley1-15/+34
The premise is that domain validation is likely to trigger errors which it wants to know about, so the only time it should be retrying them is when it gets a unit attention (likely as the result of a previous bus or device reset). Ironically, the previous coding retried three times in all cases except those of unit attention. The attached fixes this to do the right thing. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1020
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!