RE: Why is (2 < 2) true? Is it a gcc bug?

2014-01-18 Thread Dorau, Lukasz
On Friday, January 17, 2014 10:44 PM Alexei Starovoitov wrote: > On Fri, Jan 17, 2014 at 1:02 PM, Markus Trippelsdorf > wrote: > > On 2014.01.17 at 11:58 -0800, Alexei Starovoitov wrote: > >> On Fri, Jan 17, 2014 at 9:58 AM, Alexei Starovoitov > >> wrote: > >> > On Fri, Jan 17, 2014 at 5:37 AM,

Re: Disk spin-up optimization during system resume

2014-01-18 Thread Tejun Heo
Hello, On Fri, Jan 17, 2014 at 08:41:00PM -0500, Alan Stern wrote: > The intention is that this will help on systems with more than one > disk drive. The one containing the core OS files and the journal will > certainly spin up right away, but the others may not. > > To tell the truth, I'm not s

Re: Disk spin-up optimization during system resume

2014-01-18 Thread Tejun Heo
Hello, Phillip. On Fri, Jan 17, 2014 at 03:55:30PM -0500, Phillip Susi wrote: > > What kind of use cases are we expecting for the lazy behavior? > > Not all systems only have a single drive. There may be a tendency for > IO to the drive with the root fs on it after a resume, but multi drive > sy

Re: Disk spin-up optimization during system resume

2014-01-18 Thread Alan Stern
On Fri, 17 Jan 2014, Dan Williams wrote: > I think it's a bit of an interface surprise to have pm_runtime disable > have side effects only for scsi_disk devices. I think lazy_resume > needs to be an explicit attribute of the disk. For ata devices any > command wakes up the drive. Perhaps we cou

Re: XHCI issues: WD MyBook 1230 - reset SuperSpeed USB device

2014-01-18 Thread Christian Franke
Peter Palúch wrote: Gentlemen, First of all, thank you very much for looking into this issue. Alan, for the sake of keeping the thread tidy in archives, I am not going to change the $SUBJECT of this e-mail but I wholeheartedly agree that this is not an xHCI issue. Mea culpa; I did not know th

Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()

2014-01-18 Thread Bjorn Helgaas
On Sat, Jan 18, 2014 at 12:15 AM, Alexander Gordeev wrote: > On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote: >> > As the release is supposedly this weekend, do you prefer >> > the patches to go to your tree or to individual trees after >> > the release? >> >> I'd be happy to merge t

Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()

2014-01-18 Thread Tejun Heo
On Sat, Jan 18, 2014 at 07:38:55AM -0700, Bjorn Helgaas wrote: > On Sat, Jan 18, 2014 at 12:15 AM, Alexander Gordeev > wrote: > > On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote: > >> > As the release is supposedly this weekend, do you prefer > >> > the patches to go to your tree or

Re: XHCI issues: WD MyBook 1230 - reset SuperSpeed USB device

2014-01-18 Thread Peter Palúch
Christian, Douglas, Hannes: I believe we are definitely on to something. I do _not_ run smartd but this may be caused by something in my Gnome3 GUI environment. I have noticed that when I am not logged in to Gnome and work just in the text console, plugging in the USB drive and accessing it w

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst [NEW HARDWARE]

2014-01-18 Thread walt
On 01/17/2014 06:34 AM, David Laight wrote: > From: walt >> Oy, Sarah! ;) I put the ASMedia adapter in my older amd64 machine, and, >> well, >> the stupid thing Just Works(TM) with kernel 3.12.7! (Yes, with the same disk >> docking station, too.) >> >> I can't believe the adapter works perfectly

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst [NEW HARDWARE]

2014-01-18 Thread walt
On 01/17/2014 06:34 AM, David Laight wrote: > Can you try the patch I posted that stops the ownership on LINK TRBs > being changed before that on the linked-to TRB? Please disregard my earlier post about the patch not applying cleanly. That was the usual html corruption, so I found the original o

Re: XHCI issues: WD MyBook 1230 - reset SuperSpeed USB device

2014-01-18 Thread Peter Palúch
Gentlemen, I believe I've found the root cause of the issue. USB is absolutely not to blame in this case. Problems were caused by the udisksd daemon that sent ATA IDENTIFY DEVICE pass through command with the SECTOR_COUNT field set to 0 (cdb[6] = 0). I first noticed it when I compared the str

[PATCH-v2 10/17] target: Add protection SGLs to target_submit_cmd_map_sgls

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support to target_submit_cmd_map_sgls() for accepting 'sgl_prot' + 'sgl_prot_count' parameters for DIF protection information. Note the passed parameters are stored at se_cmd->t_prot_sg and se_cmd->t_prot_nents respectively. Also, update tcm_loop and vho

[PATCH-v2 00/17] target: Add support for DIF Type1+Type3 emulation + passthrough

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MKP & Co, This -v2 series contains support for target mode DIF Type1+Type3 emulation within target core, FILEIO, and RAMDISK_MCP device backends, BIP passthrough of T10 PI within IBLOCK device backends, and DIF/DIX host support in the tcm_loop fabric driver. DIF emul

[PATCH-v2 13/17] target/file: Add DIF protection support to fd_execute_rw

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF protection into fd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic. It adds fd_do_prot_rw() for handling interface with FILEIO PI, and uses a locally allocated fd_prot->prot_buf + fd_prot->prot_sg for interac

[PATCH-v2 08/17] target/spc: Expose ATO bit in control mode page

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_modesense_control() to set the Application Tag Owner (ATO) bit when when DIF emulation is enabled by the backend device. Reviewed-by: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by:

[PATCH-v2 11/17] target/iblock: Add blk_integrity + BIP passthrough support

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds blk_integrity passthrough support for block_device backends using IBLOCK. This includes iblock_alloc_bip() + setup of bio_integrity_payload information that attaches to the leading struct bio once bio_list is populated during fast-path iblock_execute_rw()

[PATCH-v2 12/17] target/file: Add DIF protection init/format support

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF protection init/format support into the FILEIO backend. It involves using a seperate $FILE.protection for storing PI that is opened via fd_init_prot() using the common pi_prot_type attribute. The actual formatting of the protection is done

[PATCH-v2 07/17] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device. Reviewed-by: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by: Nicholas Be

[PATCH-v2 03/17] target/sbc: Add DIF setup in sbc_check_prot + sbc_parse_cdb

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting cmd->prot_type once sanity checks have passed. Also, add calls in sbc_parse_cdb() for READ_[10,12,16] + WRITE_[10,12,16] to perform DIF sanity checking. v2 changes:

[PATCH-v2 17/17] tcm_loop: Enable DIF/DIX modes in SCSI host LLD

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_loop_driver_probe() to set protection information using scsi_host_set_prot() and scsi_host_set_guard(), which currently enabled all modes of DIF/DIX protection, minus DIX TYPE0. Also, update tcm_loop_submission_work() to pass struct scsi_cmnd relat

[PATCH-v2 05/17] target/spc: Add protection bit to standard INQUIRY output

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_emulate_inquiry_std() to set the PROTECT bit when DIF emulation is enabled by the backend device. Reviewed-by: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by: Nicholas Bellinger ---

[PATCH-v2 09/17] target/configfs: Expose protection device attributes

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for exposing DIF protection device attributes via configfs. This includes: pi_prot_type: Protection Type (0, 1, 3 currently support) pi_prot_format: Protection Format Operation (FILEIO only) Within se_dev_set_pi_prot_type() it also adds th

[PATCH-v2 15/17] target/rd: Add support for protection SGL setup + release

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds rd_build_prot_space() + rd_release_prot_space() logic to setup + release protection information scatterlists. It also adds rd_init_prot() + rd_free_prot() se_subsystem_api callbacks used by target core code for setup + release of protection information.

[PATCH-v2 06/17] target/spc: Add protection related bits to INQUIRY EVPD=0x86

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_emulate_evpd_86() (extended INQUIRY) to report GRD_CHK (Guard Check) and REF_CHK (Reference Check) bits when DIF emulation is enabled by the backend device. Reviewed-by: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimb

[PATCH-v2 02/17] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ exception cases into transport_send_check_condition_and_sense(). This includes: LOGICAL BLOCK GUARD CHECK FAILED LOGICAL BLOCK APPLICATION TAG CHECK FAILED LOGICAL BLOCK REFERENCE TAG CHECK FAILED t

[PATCH-v2 04/17] target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF read/write verify emulation for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation. This includes sbc_dif_verify_write() + sbc_dif_verify_read() calls accessable by backend drivers to perform DIF verify for SGL based data and protecti

[PATCH-v2 14/17] target/rd: Refactor rd_build_device_space + rd_release_device_space

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch refactors rd_build_device_space() + rd_release_device_space() into rd_allocate_sgl_table() + rd_release_device_space() so that they may be used seperatly for setup + release of protection information scatterlists. Also add explicit memset of pages within rd_al

[PATCH-v2 16/17] target/rd: Add DIF protection into rd_execute_rw

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic. It also adds rd_get_prot_table() for locating protection SGLs assoicated with the ramdisk backend device. v2 changes: - Make rd_execute_r

[PATCH-v2 01/17] target: Add DIF related base definitions

2014-01-18 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds DIF related definitions to target_core_base.h that includes enums for target_prot_op + target_prot_type + target_prot_version + target_guard_type + target_pi_error. Also included is struct se_dif_v1_tuple, along with changes to struct se_cmd, struct se_de