[PATCH v2 0/4] Support runtime power off of HDD

2012-09-18 Thread Aaron Lu
v2: Introduced a new flag sync_before_stop as scsi_stop = ata_flush_cache + ata_standby_immediate. This flag specifies that when stop command is to send to this device, please issue an additional synchronize cache command to it before the stop command. Put device into stop power condition on runtim

[PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
When scsi device received stop command, it will take care of its internal cache before enters stopped power condition. This command is translated to standby immediate in libata-scsi, but standby doesn't imply flush cache for ATA device, so to issue stop command to ATA device, an additional flush ca

[PATCH v2 2/4] scsi: sd: enter stop power condition on runtime suspend

2012-09-18 Thread Aaron Lu
On runtime suspend, put device into stop power condition. For standard scsi device, no need to synchronize cache. For ata devices, issue synchronize cache before enter standby state as reflected by the sync_before_stop flag. Signed-off-by: Aaron Lu --- drivers/ata/libata-scsi.c | 1 + drivers/

[PATCH v2 4/4] libata: acpi: set can_power_off for both ODD and HDD

2012-09-18 Thread Aaron Lu
Hard disk may also be runtime powered off, so set can_power_off flag for it too if condition satisfies so that the may_power_off sysfs file will be created for it to give user a chance to disable runtime power off. Signed-off-by: Aaron Lu Acked-by: Jeff Garzik --- drivers/ata/libata-acpi.c | 25

[PATCH v2 3/4] scsi: sd: set ready_to_power_off for scsi disk

2012-09-18 Thread Aaron Lu
The ready_to_power_off flag is used to give indication to ATA layer if this device's power can be removed after runtime suspended from the perspective of scsi driver. It is introduced to support zero power ODD. When ODD is runtime suspended, it may not be OK to remove its power. But for disk, the

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Oliver Neukum
On Tuesday 18 September 2012 15:00:28 Aaron Lu wrote: > When scsi device received stop command, it will take care of its > internal cache before enters stopped power condition. This command is > translated to standby immediate in libata-scsi, but standby doesn't > imply flush cache for ATA device,

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 09:30:11AM +0200, Oliver Neukum wrote: > On Tuesday 18 September 2012 15:00:28 Aaron Lu wrote: > > When scsi device received stop command, it will take care of its > > internal cache before enters stopped power condition. This command is > > translated to standby immediate i

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread James Bottomley
On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > When scsi device received stop command, it will take care of its > internal cache before enters stopped power condition. This command is > translated to standby immediate in libata-scsi, but standby doesn't > imply flush cache for ATA device, so

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > When scsi device received stop command, it will take care of its > > internal cache before enters stopped power condition. This command is > > translated to standby immediate in

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread James Bottomley
On Tue, 2012-09-18 at 16:09 +0800, Aaron Lu wrote: > On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > > When scsi device received stop command, it will take care of its > > > internal cache before enters stopped power condit

Re: [PATCH v2 1/4] scsi: introduce sync_before_stop flag

2012-09-18 Thread Aaron Lu
On Tue, Sep 18, 2012 at 09:20:20AM +0100, James Bottomley wrote: > On Tue, 2012-09-18 at 16:09 +0800, Aaron Lu wrote: > > On Tue, Sep 18, 2012 at 08:56:55AM +0100, James Bottomley wrote: > > > On Tue, 2012-09-18 at 15:00 +0800, Aaron Lu wrote: > > > > When scsi device received stop command, it will

Re: [PATCH 22/24] scsi: eesox: use __iomem pointers for MMIO

2012-09-18 Thread Arnd Bergmann
On Monday 17 September 2012, Russell King - ARM Linux wrote: > In both of my replies, I've said "as x86 does". We need to follow > x86's behaviour here, which is as I've quoted - it's not a matter > that "I need to make up my mind" - my mind is already well made up. > That is, we need to follow x8

Re: [V4 PATCH 0/8] csiostor: Chelsio FCoE offload driver submission

2012-09-18 Thread James Bottomley
On Tue, 2012-09-18 at 09:54 +0530, Naresh Kumar Inna wrote: > Hi James, > > Could you please consider merging version V4 of the driver patches, if > you think they are in good shape now? Well, definitely not yet; you seem to have missed the memo on readq: CC [M] drivers/scsi/cxgbi/cxgb4i/cxgb

Kernel crash with unsupported DIF protection type

2012-09-18 Thread Hannes Reinecke
Hi all, I recently got my hands on some weird drives, insisting on having been formatted with protection type 7: # sg_readcap --16 /dev/sdb Read Capacity results: Protection: prot_en=1, p_type=6, p_i_exponent=0 Logical block provisioning: lbpme=0, lbprz=0 Last logical block address=17581

Re: Kernel crash with unsupported DIF protection type

2012-09-18 Thread Douglas Gilbert
On 12-09-18 11:04 AM, Hannes Reinecke wrote: Hi all, I recently got my hands on some weird drives, insisting on having been formatted with protection type 7: # sg_readcap --16 /dev/sdb Read Capacity results: Protection: prot_en=1, p_type=6, p_i_exponent=0 Logical block provisioning: lbp

Re: Kernel crash with unsupported DIF protection type

2012-09-18 Thread Hannes Reinecke
On 09/18/2012 11:30 AM, Douglas Gilbert wrote: > On 12-09-18 11:04 AM, Hannes Reinecke wrote: >> Hi all, >> >> I recently got my hands on some weird drives, insisting on having >> been formatted with protection type 7: >> >> # sg_readcap --16 /dev/sdb >> Read Capacity results: >> Protection: pr

Re: Kernel crash with unsupported DIF protection type

2012-09-18 Thread Douglas Gilbert
On 12-09-18 11:35 AM, Hannes Reinecke wrote: On 09/18/2012 11:30 AM, Douglas Gilbert wrote: On 12-09-18 11:04 AM, Hannes Reinecke wrote: Hi all, I recently got my hands on some weird drives, insisting on having been formatted with protection type 7: # sg_readcap --16 /dev/sdb Read Capacity re

Discard merging / Write same support v5

2012-09-18 Thread Martin K. Petersen
I've been beating on this patch kit for the last few weeks with a bunch of different devices. I have also tested extensively with Shaohua Li's MD RAID0 discard support. The only functional change is support for discard and write same bio/request merging. Other than that there were a few tweaks for

[PATCH 2/8] block: Consolidate command flag and queue limit checks for merges

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" - blk_check_merge_flags() verifies that cmd_flags / bi_rw are compatible. This function is called for both req-req and req-bio merging. - blk_rq_get_max_sectors() and blk_queue_get_max_sectors() can be used to query the maximum sector count for a given reque

[PATCH 4/8] block: Make blkdev_issue_zeroout use WRITE SAME

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" If the device supports WRITE SAME, use that to optimize zeroing of blocks. If the device does not support WRITE SAME or if the operation fails, fall back to writing zeroes the old-fashioned way. Signed-off-by: Martin K. Petersen Acked-by: Mike Snitzer --- block/blk-

[PATCH 1/8] block: Clean up special command handling logic

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" Remove special-casing of non-rw fs style requests (discard). The nomerge flags are consolidated in blk_types.h, and rq_mergeable() and bio_mergeable() have been modified to use them. bio_is_rw() is used in place of bio_has_data() a few places. This is done to to distin

[PATCH 5/8] block: ioctl to zero block ranges

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" Introduce a BLKZEROOUT ioctl which can be used to clear block ranges by way of blkdev_issue_zeroout(). Signed-off-by: Martin K. Petersen Acked-by: Mike Snitzer --- block/ioctl.c | 27 +++ include/linux/fs.h |1 + 2 files changed, 2

[PATCH 6/8] scsi: Add a report opcode helper

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" The REPORT SUPPORTED OPERATION CODES command can be used to query whether a given opcode is supported by a device. Add a helper function that allows us to look up commands. We only issue RSOC if the device reports compliance with SPC-3 or later. But to err on the side

[PATCH 3/8] block: Implement support for WRITE SAME

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" The WRITE SAME command supported on some SCSI devices allows the same block to be efficiently replicated throughout a block range. Only a single logical block is transferred from the host and the storage device writes the same data to all blocks described by the I/O. T

[PATCH 7/8] sd: Permit merged discard requests

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" Support requests with more than one bio payload for discards. The total number of bytes to be discarded is stored in req->__data_len and used in sd_done() to complete the I/O. Signed-off-by: Martin K. Petersen Acked-by: Mike Snitzer --- drivers/scsi/sd.c | 32

[PATCH 8/8] sd: Implement support for WRITE SAME

2012-09-18 Thread Martin K. Petersen
From: "Martin K. Petersen" Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk driver. - We set the default maximum to 0x because there are several devices out there that only support two-byte block counts even with WRITE SAME(16). We only enable transfers bigger

Re: [V4 PATCH 0/8] csiostor: Chelsio FCoE offload driver submission

2012-09-18 Thread Naresh Kumar Inna
On 9/18/2012 2:06 PM, James Bottomley wrote: > On Tue, 2012-09-18 at 09:54, Naresh Kumar Inna wrote: >> Hi James, >> >> Could you please consider merging version V4 of the driver patches, if >> you think they are in good shape now? > > Well, definitely not yet; you seem to have missed the memo on

Re: Fail to probe qla2xxx fiber channel card while doing pci hotplug

2012-09-18 Thread Bjorn Helgaas
On Mon, Sep 17, 2012 at 6:06 AM, Yijing Wang wrote: > On 2012/9/16 11:30, Bjorn Helgaas wrote: >> On Sat, Sep 15, 2012 at 4:22 AM, Yijing Wang wrote: >>> Hi all, >>>I encountered a very strange problem when I hot plug a fiber channel >>> card(using qla2xxx driver). >>> I did the hotplug in a

Re: [PATCH 2/8] block: Consolidate command flag and queue limit checks for merges

2012-09-18 Thread Mike Snitzer
On Tue, Sep 18 2012 at 12:19pm -0400, Martin K. Petersen wrote: > From: "Martin K. Petersen" > > - blk_check_merge_flags() verifies that cmd_flags / bi_rw are >compatible. This function is called for both req-req and req-bio >merging. > > - blk_rq_get_max_sectors() and blk_queue_get_

[PATCH] qla2xxx: Fix endianness of task management response code

2012-09-18 Thread Roland Dreier
From: Roland Dreier The qla2xxx firmware actually expects the task management response code in a CTIO IOCB with SCSI status mode 1 to be in little-endian byte order, ie the response code should be the first byte in the sense_data[] array. The old code erroneously byte-swapped the response code,

Re: [PATCH] qla2xxx: Fix endianness of task management response code

2012-09-18 Thread Nicholas A. Bellinger
On Tue, 2012-09-18 at 15:10 -0700, Roland Dreier wrote: > From: Roland Dreier > > The qla2xxx firmware actually expects the task management response > code in a CTIO IOCB with SCSI status mode 1 to be in little-endian > byte order, ie the response code should be the first byte in the > sense_data

[Bug 47701] New: When too many disks fall out at the same time, RCU hangs

2012-09-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=47701 Summary: When too many disks fall out at the same time, RCU hangs Product: IO/Storage Version: 2.5 Kernel Version: 3.5.4 Platform: All OS/Version: Linux Tree:

Re: Fail to probe qla2xxx fiber channel card while doing pci hotplug

2012-09-18 Thread Giridhar Malavali
On 9/18/12 10:54 AM, "Bjorn Helgaas" wrote: >On Mon, Sep 17, 2012 at 6:06 AM, Yijing Wang >wrote: >> On 2012/9/16 11:30, Bjorn Helgaas wrote: >>> On Sat, Sep 15, 2012 at 4:22 AM, Yijing Wang >>>wrote: Hi all, I encountered a very strange problem when I hot plug a fiber channe

Re: Fail to probe qla2xxx fiber channel card while doing pci hotplug

2012-09-18 Thread Yijing Wang
On 2012/9/19 1:54, Bjorn Helgaas wrote: > On Mon, Sep 17, 2012 at 6:06 AM, Yijing Wang wrote: >> On 2012/9/16 11:30, Bjorn Helgaas wrote: >>> On Sat, Sep 15, 2012 at 4:22 AM, Yijing Wang wrote: Hi all, I encountered a very strange problem when I hot plug a fiber channel card(us

Re: [PATCH] qla2xxx: Fix endianness of task management response code

2012-09-18 Thread Saurav Kashyap
>From: Roland Dreier > >The qla2xxx firmware actually expects the task management response >code in a CTIO IOCB with SCSI status mode 1 to be in little-endian >byte order, ie the response code should be the first byte in the >sense_data[] array. The old code erroneously byte-swapped the >respon