Commit Graph

189838 Commits (5e4f8fe7b58f4da5043b7f219fe9193cddd9262e)

Author SHA1 Message Date
Robert Love 5e4f8fe7b5 [SCSI] fcoe: move link speed checking into its own routine
It doesn't make sense to update the link speed in the is_link_ok()
routine. Move it to it's own routine and acquire the device speed
when we're configuring the device initially as well as if there are
any netdev events received.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 22:22:32 -04:00
Robert Love d29510a296 [SCSI] libfc: Remove extra pointer check
The fcf pointer is checked again after this verification
making the first check redundant. Remote the first check.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 22:22:30 -04:00
Robert Love 1b80e0f91c [SCSI] libfc: Remove unused fc_get_host_port_type
Remove this unused routine.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 22:22:29 -04:00
Vasu Dev 721cafafb6 [SCSI] fcoe: fixes wrong error exit in fcoe_create
fcoe_create exits using out_nodev label when module is not
yet LIVE but this exit path unlocks the rtnl_lock though
rtnl lock was not held in this case.

So this patch replaces out_nodev with out_nomod to exit
w/o unlocking rtnl_lock.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 22:22:27 -04:00
Joe Eykholt b3667f9177 [SCSI] libfc: set seq_id for incoming sequence
After the recent patch "fixes unnecessary seq id jump"
the SCST module fcst stopped working because multi-sequence
write data wasn't finding the sequence after the first frame.

Add back the setting of the seq_id when the first frame arrives.
Also fix indentation on two lines.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 22:22:25 -04:00
Giridhar Malavali f1af6208c8 [SCSI] qla2xxx: Updates to ISP82xx support.
1) Allow transition to NEED RESET state only from READY state for ISP82xx.
2) Avoid infinite ISP aborts when chip reset fails.
3) Code cleanup to remove some of the unused debug code.

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:22:11 -04:00
Giridhar Malavali f4c496c1fb [SCSI] qla2xxx: Optionally disable target reset.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:22:09 -04:00
Lalit Chandivade 86fbee86e9 [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
The problem occurring is a hw-race where there's an outstanding read-flash
operation occurring while the chip is being reset (done via an sg_reset script).
After the chip is paused, the read-flash operation never completes and the
DPC thread, while trying to complete the reset, is never able to recover,
as the HW appears to be hung...

The fix is to wait for outstanding flash operation prior to doing a sg_reset -h.
And to wait for reset to complete before any flash operations.

Note, during the wait, if any of the operation (reset/flash) does not complete,
failure is returned to the upper layer. The upper layer either need to
fail or retry.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:22:07 -04:00
Mike Waychison 1516ef4483 [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
The qla2xxx driver uses a port_id_t to mark the start of its enumerations.  gcc
is complaining that wrap.b24 may be used uninitialized, but this doesn't look
to be possible.  Silence it.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:22:06 -04:00
Arun Easi bad7500289 [SCSI] qla2xxx: T10 DIF support added.
Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:59 -04:00
Madhuranath Iyengar 3822263eb1 [SCSI] qla2xxx: Support for asynchronous TM and Marker IOCBs.
Currently we can only issue the task management (TM)
commands via the mailbox mechanism. This is a limitation,
since only one mailbox command can be issued at a time.
The purpose of this effort is to provide support for
issuing and processing the respose to TM and Marker
IOCBs asynchronously. Towards achieving this, the
consolidated srb architecture that is currently used for
BSG and IOCB/Logio commands has been enhanced and used.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:57 -04:00
Madhuranath Iyengar 4916392b56 [SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.
Currently, BSG and IOCB/Logio commands have a different
framework (srb structs). The purpose of this effort is to
consolidate them into a generalized framework for these
as well as other asynchronous operations in the future.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:56 -04:00
Andrew Vasquez b7d2280c15 [SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements.
Migrate to a consistent set of debug entries during status-IOCB
handling:

* group CS_TIMEOUT handling with CS_PORT_UNAVAILABLE and the like
  (more regrouping of common behaviour).

* drop CS_DATA_OVERRUN handling as it now falls into the
  'default' case (still returns DID_ERROR).

* consolidate CS_RESET and CS_ABORTED handling, as we the only
  functional difference was a printk() (still returns DID_RESET).

* dropped all the earlier inconsistent [qla_]printk()s sprinkled
  throught the needlessly large case-statement.  Failure case
  I/Os are now logged with a 'standard' format:

	<command failure details>
	<command generic details>

  so, for example a dropped-frame is logged as:

	qla2xxx 0000:13:00.0: scsi(16:0:0) Dropped frame(s) detected (4000 of 4000 bytes).
	qla2xxx 0000:13:00.0: scsi(16:0:0) FCP command status: 0x15-0x18 (70018) \
    oxid=78 ser=76 cdb=280000 len=4000 rsp_info=0 resid=0 fw_resid=4000

  which should now convey all relevant information.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:54 -04:00
Andrew Vasquez 5ff1d58410 [SCSI] qla2xxx: Limit mailbox command contention for ADISC requests.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:47 -04:00
Andrew Vasquez 99b0bec7bb [SCSI] qla2xxx: Further generalization of SRB CTX infrastructure.
Prepare CTX infrastructure for additional asynchronous
executions, add generic done() operator, pull CMD definitions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:44 -04:00
Harish Zunjarrao 6a03b4cd78 [SCSI] qla2xxx: Add char device to increase driver use count
The driver should not be unloaded if any application is using it.
To disallow driver unload, driver use count must be incremented.
Application uses this char device as handle and increases driver
use count to avoid possible driver unload.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:42 -04:00
Lalit Chandivade 3e46f03132 [SCSI] qla2xxx: Clear error status after uncorrectable non-fatal errors.
Currently error status is cleared only after the uncorrectable fatal errors
in the qla2xxx_pci_slot_reset. This fix is added to clear the error status in
qla2xxx_pci_resume. This way for both fatal and non-fatal errors the error
status gets cleared properly.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=572258

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:34 -04:00
Andrew Vasquez 62542f4b05 [SCSI] qla2xxx: Display proper link state for disconnected ports.
With qla2xxx using mid-layer async-scsi-scanning, the link state for
disconnected port is displayed wrong. Additional check for cable presence
is considered to display proper link state.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:31 -04:00
Andrew Vasquez 0b9dae6aeb [SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware version.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-16 18:21:30 -04:00
Geert Uytterhoeven b1de6ab794 [SCSI] a2091: Kill ugly DMA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 16:02:11 -04:00
Geert Uytterhoeven afdbbc1613 [SCSI] a3000: Use shost_priv() and kill ugly HDATA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 16:01:55 -04:00
Geert Uytterhoeven ce195662bb [SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 16:01:38 -04:00
Geert Uytterhoeven 52c3d8a65f [SCSI] gvp11: Use shost_priv() and kill ugly HDATA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 16:01:24 -04:00
Geert Uytterhoeven 6d1d5d43e5 [SCSI] a2091: Use shost_priv() and kill ugly HDATA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 16:01:09 -04:00
Geert Uytterhoeven 2135101340 [SCSI] a3000: Reindentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:55:17 -04:00
Geert Uytterhoeven be4540db06 [SCSI] mvme147: Reindentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:55:03 -04:00
Geert Uytterhoeven bb17b7871b [SCSI] gvp11: Reindentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:54:47 -04:00
Geert Uytterhoeven 09bc85b08c [SCSI] a2091: Reindentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:54:31 -04:00
Geert Uytterhoeven 900e8d6b87 [SCSI] wd33c93: Kill empty wd33c93_release()
wd33c93_release() has been empty since ages, and sgiwd93.c no longer calls it
since its conversion to a proper platform driver 2 years ago. Also remove the
callers in the m68k wd33c93 shims.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:54:15 -04:00
Christof Schmitt 6e51f085f6 [SCSI] zfcp: Zero memory for gpn_ft and adisc requests
With debug kernels, the memory allocated with kmem_cache_alloc might
be initialized with the poison values 6b and a5. Use kmem_cache_zalloc
instead of kmem_cache_alloc to get zeroed memory and not send invalid
requests.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:42:34 -04:00
Christof Schmitt 64deb6efdc [SCSI] zfcp: Use status_read_buf_num provided by FCP channel
The FCP channel provides the number of status read buffers to issue.
Use the provided number instead of the hardcoded number in zfcp.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:42:33 -04:00
Christof Schmitt 6b9e152009 [SCSI] zfcp: Move sbal_get function to zfcp_qdio.c
Waiting for a free sbal is a operation on the qdio queue. Move the
code implementing the wait to zfcp_qdio.c and rename the functions
accordingly.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:42:32 -04:00
Christof Schmitt 1674b40547 [SCSI] zfcp: Move sbale handling to zfcp_qdio files
Move the code accessing the qdio sbales and zfcp_qdio_req struct to
the zfcp_qdio files and provide helper functions for accessing the
qdio related parts.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:42:30 -04:00
Christof Schmitt 683229845f [SCSI] zfcp: Report scatter-gather limits to SCSI and block layer
Instead of dealing with large segments in the scatter-gather lists in
zfcp_qdio.c, report the limits to the upper layers. With these limits
in place, the code for mapping large data blocks to multiple sbales
can be removed.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:42:29 -04:00
Ravi Anand 883c98feaa [SCSI] Adding MAINTAINERS for qla4xxx iSCSI driver.
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:40:33 -04:00
Vikas Chaudhary 1a6633da20 [SCSI] qla4xxx: Update driver version to 5.02.00-k1
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:40:21 -04:00
Vikas Chaudhary 09a0f71989 [SCSI] qla4xxx: added support for abort task management command
* Handles SCSI command aborts.
* Serialization srb between error handler and command
  completion path.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:40:12 -04:00
Vikas Chaudhary 5369887a95 [SCSI] qla4xxx: correct use of cmd->host_scribble
used cmd->host_scribble to store iocb command handle.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:40:02 -04:00
Vikas Chaudhary 821d6e5413 [SCSI] qla4xxx: do not retry login to CHAP auth failed targets
Per RFC 3720, Login Response Status Code 0x02 should not be retried.
Condensed connection error checking code to a single routine, and
added check for status class 0x02.

Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:39:49 -04:00
Vikas Chaudhary c301b0266c [SCSI] qla4xxx: Updated firmware ready timeout algorithm
Updated firmware ready timeout algorithm to prevent
long delays and use jiffies to time out instead of
counter. Also use msleep_interruptible instead of msleep.

Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:39:38 -04:00
Vikas Chaudhary c2393cd2df [SCSI] qla4xxx: Code Clean up - remove "marker_needed"
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:39:29 -04:00
Vikas Chaudhary 065aa1b4db [SCSI] qla4xxx: set device state as per Link UP and LINK DOWN
Link Down -> Mark all devices missing
 Previously, the driver took no action on a Link Down,
 and waited for the I/O on a dead connection to timeout
 in the firmware before marking the DDB missing.

Link Up -> Mark all devices online
 F/W will do auto login to all the devices only once.
 After that its the responsibility of the driver to
 relogin to devices whenever there is :
        * Any sort of connection failure or
        * KATO expires indicating target has logged out or
        * I/O times out etc.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:39:20 -04:00
Vikas Chaudhary 2a49a78ed3 [SCSI] qla4xxx: added IPv6 support.
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:38:19 -04:00
Roland Dreier 3487d9e7c4 [SCSI] cxgb3i: Fix error path for module init
If cxgb3i_pdu_init() fails, then it appears that cxgb3i_iscsi_init()
will not be cleaned up, leading to the iscsi transport being left
registered.  Fix this by adding a call to cxgb3i_iscsi_cleanup() on the
error path.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Karen Xie <kxie@chelsio.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 15:35:23 -04:00
Tom Rini 7407e5bba2 [SCSI] Unexport scsi/scsi.h from headers_install
The scsi/scsi.h header is normally provided by the libc (and was not
exported by the kernel since 2.6.24) and has been until it was
re-exported with 2.6.31.  The kernel version is not userspace clean and
does not appear to provide anything useable in userland over the
(e)glibc version.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 11:45:12 -04:00
Dan Carpenter 2471b89406 [SCSI] pm8001: potential null dereference in pm8001_dev_gone_notify()
In the original code we dereferenced "pm8001_dev" before checking if it
was null.  This patch moves the dereference inside the condition.

This was found by a static checker (smatch).  I looked, but I couldn't
tell if "pm8001_dev" dev was ever actually null.  The approach in this
patch seemed like the safest response.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 11:04:23 -04:00
Brian King daa142d177 [SCSI] ibmvfc: Reduce error recovery timeout
If a command times out resulting in EH getting invoked, we wait for the
aborted commands to come back after sending the abort. Shorten
the amount of time we wait for these responses, to ensure we don't
get stuck in EH for several minutes.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 11:03:22 -04:00
Brian King f5832fa2f8 [SCSI] ibmvfc: Fix command completion handling
Commands which are completed by the VIOS are placed on a CRQ
in kernel memory for the ibmvfc driver to process. Each CRQ
entry is 16 bytes. The ibmvfc driver reads the first 8 bytes
to check if the entry is valid, then reads the next 8 bytes to get
the handle, which is a pointer the completed command. This fixes
an issue seen on Power 7 where the processor reordered the
loads from memory, resulting in processing command completion
with a stale handle. This could result in command timeouts,
and also early completion of commands.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 11:03:03 -04:00
Mike Miller 859e816704 [SCSI] hpsa: remove unneeded defines
This patch removes unnecessary #define's from hpsa. The SCSI midlayer
handles all this for us.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-02 11:02:17 -04:00
Tomohiro Kusumi 160e7f6713 [SCSI] fix sdev_rw_attr macro for scsi device sysfs entries
This patch fixes sdev_rw_attr() macro for scsi device sysfs entries.
It seems there is no such function snscanf in the current linux kernel,
so it fails to compile scsi driver when someone try to add a new rw entry.
This has been unfixed for a long time probably because current scsi device
has no rw entries.

# grep snscanf . -rn
./drivers/scsi/scsi_sysfs.c:489:        snscanf (buf, 20, format_string, &sdev->field);                 \

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-01 14:16:30 -05:00