Re: [PATCH V7 1/6] scsi: ufs: fix endianness sparse warnings

2014-05-25 Thread Sujit Reddy Thumma
On 11/18/2013 2:34 PM, vinayak holikatti wrote: On Mon, Sep 23, 2013 at 5:44 PM, vinayak holikatti wrote: On Thu, Sep 19, 2013 at 4:44 PM, Sujit Reddy Thumma wrote: Fix many warnings with incorrect endian assumptions which makes the code unportable to new architectures. The UFS specificatio

[RESEND PATCH V7 6/6] scsi: ufs: Improve UFS fatal error handling

2014-05-25 Thread Sujit Reddy Thumma
Error handling in UFS driver is broken and resets the host controller for fatal errors without re-initialization. Correct the fatal error handling sequence according to UFS Host Controller Interface (HCI) v1.1 specification. o Processed requests which are completed w/wo error are reported to SCS

[RESEND PATCH V7 4/6] scsi: ufs: Fix hardware race conditions while aborting a command

2014-05-25 Thread Sujit Reddy Thumma
There is a possible race condition in the hardware when the abort command is issued to terminate the ongoing SCSI command as described below: - A bit in the door-bell register is set in the controller for a new SCSI command. - In some rare situations, before controller get a chance to issue th

[RESEND PATCH V7 0/6] scsi: ufs: TM, fatal-error handling and other fixes

2014-05-25 Thread Sujit Reddy Thumma
This patch version fixes various static checker warnings along with fixing usage of deprecated flush_work_sync() API that led James drop the patchset from scsi-misc tree. The first patch fixes many issues with current task management handling in UFSHCD driver. Others improve error handling in vari

[RESEND PATCH V7 1/6] scsi: ufs: fix endianness sparse warnings

2014-05-25 Thread Sujit Reddy Thumma
Fix many warnings with incorrect endian assumptions which makes the code unportable to new architectures. The UFS specification defines the byte order as big-endian for UPIU structure and little-endian for the host controller transfer/task management descriptors. Signed-off-by: Sujit Reddy Thumma

[RESEND PATCH V7 2/6] scsi: ufs: make undeclared functions static

2014-05-25 Thread Sujit Reddy Thumma
Make undeclared functions static and declare exported symbols to suppress warnings from sparse tool. Signed-off-by: Sujit Reddy Thumma Acked-by: Vinayak Holikatti --- drivers/scsi/ufs/ufshcd.c | 4 ++-- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --g

[RESEND PATCH V7 3/6] scsi: ufs: Fix broken task management command implementation

2014-05-25 Thread Sujit Reddy Thumma
Currently, sending Task Management (TM) command to the card might be broken in some scenarios as listed below: Problem: If there are more than 8 TM commands the implementation returns error to the caller. Fix: Wait for one of the slots to be emptied and send the command. Problem: Som

[RESEND PATCH V7 5/6] scsi: ufs: Fix device and host reset methods

2014-05-25 Thread Sujit Reddy Thumma
As of now SCSI initiated error handling is broken because, the reset APIs don't try to bring back the device initialized and ready for further transfers. In case of timeouts, the scsi error handler takes care of handling aborts and resets. Improve the error handling in such scenario by resetting t

Re: esp_scsi QTAG in FAS216

2014-05-25 Thread Michael Schmitz
Hi Geert, > [sorry for the long delay] Tell me about it :-) I haven't had a good idea how to address this problem so rather kept mum about it. > On Mon, Apr 14, 2014 at 10:51 AM, Michael Schmitz > wrote: >> Not sure my patch had ever made it into Geert's m68k-queue - except for the >> patch in

Re: iSCSI Expected Data Transfer Length for T10-PI

2014-05-25 Thread Sagi Grimberg
On 5/25/2014 10:39 PM, Julian Satran wrote: Hi Julian, I have some trouble parsing you English/Question. I'll try to clarify. I think the intent of SCSI PI was that wherever the PI exist it should be checked end-to-end and it may be checked in between. A storage client (server) will have

Re: iSCSI Expected Data Transfer Length for T10-PI

2014-05-25 Thread Julian Satran
I have some trouble parsing you English/Question. I think the intent of SCSI PI was that wherever the PI exist it should be checked end-to-end and it may be checked in between. A storage client (server) will have the PI appended in the memory when writing and reading and checking it. As the valu

iSCSI Expected Data Transfer Length for T10-PI

2014-05-25 Thread Sagi Grimberg
Hey All, Recently, iSER end-to-end T10-PI support maid it mainline. I am wandering about the impact T10-PI should or shouldn't have on iSCSI header field "Expected Data Transfer Length". RFC-7143 states: "the Expected Data Transfer Length field contains the number of bytes of data involved in

[PATCH 4/4] scsi_debug: allow huge transfer length for read/write commands

2014-05-25 Thread Akinobu Mita
This change enables to test read/write commands with huge transfer length such as 1GB. For example: # modprobe scsi_debug dev_size_mb=1024 clustering=1 opts=1 # cat /sys/block/$DEV/queue/max_hw_sectors_kb > \ /sys/block/$DEV/queue/max_sectors_kb # fio --nam

[PATCH 2/4] block: fix SG_[GS]ET_RESERVED_SIZE ioctl when max_sectors is huge

2014-05-25 Thread Akinobu Mita
SG_GET_RESERVED_SIZE and SG_SET_RESERVED_SIZE ioctls access a reserved buffer in bytes as int type. The value needs to be capped at the request queue's max_sectors. But integer overflow is not correctly handled in the calculation when converting max_sectors from sectors to bytes. Signed-off-by:

[PATCH 3/4] scsi: increase upper limit for max_sectors

2014-05-25 Thread Akinobu Mita
max_sectors in struct Scsi_Host specifies maximum number of sectors allowed in a single SCSI command. The data type of max_sectors is unsigned short, so the maximum transfer length per SCSI command is limited to less than 256MB in 4096-bytes sector size. (0x * 4096) This commit increases the

[PATCH 0/4] scsi: increase upper limit for max_sectors

2014-05-25 Thread Akinobu Mita
This patchset increases the SCSI mid level's limitation for max_sectors upto the block layer's limitation for max_hw_sectors, and enables the scsi_debug driver to request read/write commands with huge transfer length. This also includes a few fixes for the problems which can be caused by huge max_

[PATCH 1/4] block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX

2014-05-25 Thread Akinobu Mita
BLKSECTGET ioctl loads the request queue's max_sectors as unsigned short value to the argument pointer. So if the max_sector is greater than USHRT_MAX, the upper 16 bits of that is just discarded. In such case, USHRT_MAX is more preferable than the lower 16 bits of max_sectors. Signed-off-by: Ak

Re: esp_scsi QTAG in FAS216

2014-05-25 Thread Geert Uytterhoeven
Hi Michael, [sorry for the long delay] On Mon, Apr 14, 2014 at 10:51 AM, Michael Schmitz wrote: > Not sure my patch had ever made it into Geert's m68k-queue - except for the > patch in my previous mail, my zorro_esp.c is still the same as I got from > you in October last year. The project has be

Re: [PATCH] iser-target: Add missing target_put_sess_cmd for ImmedateData failure

2014-05-25 Thread Sagi Grimberg
On 5/23/2014 10:32 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger This patch addresses a bug where an early exception for SCSI WRITE with ImmediateData=Yes was missing the target_put_sess_cmd() call to drop the extra se_cmd->cmd_kref reference obtained during the normal iscsit_setup_

Re: [PATCH] acornscsi: remove linked command support

2014-05-25 Thread James Bottomley
On Sat, 2014-05-24 at 15:16 +0200, Paul Bolle wrote: > On Sat, 2014-05-24 at 16:13 +0400, James Bottomley wrote: > > Wait, no, that's not a good idea. We leave obsolete drivers to bitrot. > > Particularly we try not to touch them unless we have to because there > > might be a few people still usin