David Blake | 1 Jan 2011 05:22
Picon
Favicon

Important mail from Mr David

My name is David Blake From Scotland, I am at the hospital waiting to die. I have a  Charity project that i want
you to do and it will benefit you and it is risk free and it is also Legal. Please get back to me so that i can give
you more details.

David

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Matthew Wilcox | 1 Jan 2011 18:08

Re: [PATCH] [SCSI] arcmsr: &/| confusion in arcmsr_build_ccb()

On Sat, Jan 01, 2011 at 05:45:11PM +0100, roel kluin wrote:
> The WRITE_{6,10,12} are defined numbers, so the branch was always taken.

You're right, but even this will basically always set the write flag,
since some bits will be set the same, even for reads.  Eg:

#define READ_10               0x28
#define WRITE_10              0x2a

It should instead be:

> +	if (pcmd->cmnd[0] == WRITE_6 || pcmd->cmnd[0] == WRITE_10 ||
> +			pcmd->cmnd[0] == WRITE_12 ){

That will of course miss other commands which do writes, such as UNMAP
and WRITE_32.  So we should do it properly:

	if (pcmd->sc_data_direction == DMA_TO_DEVICE)
		arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE;

I don't have an Areca card to test with.

> Signed-off-by: Roel Kluin <roel.kluin <at> gmail.com>
> ---
>  drivers/scsi/arcmsr/arcmsr_hba.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> See include/scsi/scsi.h:58-123 for
> #define WRITE_6               0x0a
> #define WRITE_10              0x2a
(Continue reading)

Torsten Kaiser | 1 Jan 2011 18:12

Re: [PATCH] [SCSI] arcmsr: &/| confusion in arcmsr_build_ccb()

On Sat, Jan 1, 2011 at 5:45 PM, roel kluin <roel.kluin <at> gmail.com> wrote:
> The WRITE_{6,10,12} are defined numbers, so the branch was always taken.
>
> Signed-off-by: Roel Kluin <roel.kluin <at> gmail.com>
> ---
>  drivers/scsi/arcmsr/arcmsr_hba.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> See include/scsi/scsi.h:58-123 for
> #define WRITE_6               0x0a
> #define WRITE_10              0x2a
> #define WRITE_12              0xaa
>
> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
> index 17e3df4..a6e5222 100644
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
>  <at>  <at>  -1171,7 +1171,8  <at>  <at>  static int arcmsr_build_ccb(struct AdapterControlBlock *acb,
>        arcmsr_cdb->msgPages = arccdbsize/0x100 + (arccdbsize % 0x100 ? 1 : 0);
>        if ( arccdbsize > 256)
>                arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_SGL_BSIZE;
> -       if (pcmd->cmnd[0]|WRITE_6 || pcmd->cmnd[0]|WRITE_10 || pcmd->cmnd[0]|WRITE_12 ){
> +       if (pcmd->cmnd[0] & WRITE_6 || pcmd->cmnd[0] & WRITE_10 ||
> +                       pcmd->cmnd[0] & WRITE_12 ){

I'm not sure, if the compiler will optimize this anyway, but would it
look better this way:
if (pcmd->cmnd[0] & (WRITE_6 | WRITE_10 | WRITE_12)){

And that would open the question what really was meant, as that will
(Continue reading)

Torsten Kaiser | 1 Jan 2011 18:28

Re: [PATCH] [SCSI] arcmsr: &/| confusion in arcmsr_build_ccb()

On Sat, Jan 1, 2011 at 6:08 PM, Matthew Wilcox <matthew <at> wil.cx> wrote:
> On Sat, Jan 01, 2011 at 05:45:11PM +0100, roel kluin wrote:
>> The WRITE_{6,10,12} are defined numbers, so the branch was always taken.
>
> You're right, but even this will basically always set the write flag,
> since some bits will be set the same, even for reads.  Eg:
>
> #define READ_10               0x28
> #define WRITE_10              0x2a
>
> It should instead be:
>
>> +     if (pcmd->cmnd[0] == WRITE_6 || pcmd->cmnd[0] == WRITE_10 ||
>> +                     pcmd->cmnd[0] == WRITE_12 ){
>
> That will of course miss other commands which do writes, such as UNMAP
> and WRITE_32.  So we should do it properly:
>
>        if (pcmd->sc_data_direction == DMA_TO_DEVICE)
>                arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE;
>

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ae52e7f09ff509df11cd408eabe90132b6be1231;hp=f034260db330bb3ffc815fcb682b1c84aca09591#patch2>
 <at>  <at>  -1034,10 +1075,10  <at>  <at>  static int arcmsr_build_ccb(struct
AdapterControlBlock *acb,
                }
                arcmsr_cdb->sgcount = (uint8_t)cdb_sgcount;
                arcmsr_cdb->DataLength = scsi_bufflen(pcmd);
+       arcmsr_cdb->msgPages = arccdbsize/0x100 + (arccdbsize % 0x100 ? 1 : 0);
                if ( arccdbsize > 256)
(Continue reading)

Christian Schmidt | 1 Jan 2011 18:32
Picon
Favicon

Re: Linux support for the LSI SAS8208ELP

Hi Matthew,

On 12/31/2010 06:52 PM, Matthew Wilcox wrote:
> On Fri, Dec 31, 2010 at 05:43:29PM +0100, Christian Schmidt wrote:
>> Since LSI seems to only provide closed source drivers for far obsolete
>> and limited "enterprise" distribution kernels I'd suggest the inclusion
>> of the PCI IDs into the kernel.
> 
> http://marc.info/?l=linux-scsi&m=129019864003449&w=2
> 
> (ok, 0x55 vs 0x59, but dollars-to-doughnuts it's the same 'problem')

Thanks for the link. On my mainboard it wasn't a BIOS setting but a
jumper that changed the mode.

Regards,
Christian
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Matthew Wilcox | 2 Jan 2011 00:34

Re: [PATCH] [SCSI] arcmsr: &/| confusion in arcmsr_build_ccb()

On Sat, Jan 01, 2011 at 06:28:34PM +0100, Torsten Kaiser wrote:
> <http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ae52e7f09ff509df11cd408eabe90132b6be1231;hp=f034260db330bb3ffc815fcb682b1c84aca09591#patch2>
> -       if (pcmd->sc_data_direction == DMA_TO_DEVICE ) {
> +       if (pcmd->cmnd[0]|WRITE_6 || pcmd->cmnd[0] | WRITE_10 ||
> pcmd->cmnd[0]|WRITE_12) {
> 
> Until June 2010 it was that way...

So it was.  Nick, why did you make this change?  Your commit message is
less than informative, partly because you're making such huge changes
in a single commit.

--

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Mike Christie | 2 Jan 2011 05:11
Picon
Favicon

Re: [PATCH 06/16] BNX2I: Added code to handle the binding of an existing connection

On 11/17/2010 09:24 PM, Mike Christie wrote:
> On 11/10/2010 05:04 PM, Eddie Wai wrote:
>> This is the case when iscsid gets re-launched due to features like
>> iSCSI boot which requires the daemon to re-launch due to
>> pivot root. If the code detected the connection had an existing
>> endpoint, the old endpoint must get cleaned up.
>>
>> Signed-off-by: Eddie Wai<eddie.wai <at> broadcom.com>
>> Acked-by: Anil Veerabhadrappa<anilgv <at> broadcom.com>
>> ---
>> drivers/scsi/bnx2i/bnx2i_iscsi.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>> b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>> index 823e4fa..3b65c64 100644
>> --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>> +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>>  <at>  <at>  -1410,6 +1410,13  <at>  <at>  static int bnx2i_conn_bind(struct
>> iscsi_cls_session *cls_session,
>> hba->netdev->name);
>> return -EEXIST;
>> }
>> + if (bnx2i_conn->ep) {
>> + printk(KERN_ALERT "bnx2i: Binding to an existing endpoint "
>> + "detected. Disconnecting the old...\n");
>> + mutex_lock(&hba->net_dev_lock);
>> + bnx2i_hw_ep_disconnect(bnx2i_conn->ep);
>> + mutex_unlock(&hba->net_dev_lock);
>> + }
(Continue reading)

Bart Van Assche | 2 Jan 2011 18:27
Picon
Favicon

Re: [RFC 6/8] IB/srp: reduce lock coverage of command completion

On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillowda <at> ornl.gov> wrote:
> [ ... ]
>  <at>  <at>  -913,14 +917,6  <at>  <at>  static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
>  {
>        struct srp_request *req;
>        struct scsi_cmnd *scmnd;
> -       unsigned long flags;
> -       s32 delta;
> -
> -       delta = (s32) be32_to_cpu(rsp->req_lim_delta);
> -
> -       spin_lock_irqsave(target->scsi_host->host_lock, flags);
> -
> -       target->req_lim += delta;
>
>        if (unlikely(rsp->tag & SRP_TAG_TSK_MGMT)) {
>                target->tsk_mgmt_status = -1;
>  <at>  <at>  -948,12 +944,10  <at>  <at>  static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
>                else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER))
>                        scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
>
> +               srp_remove_req(target, req, be32_to_cpu(rsp->req_lim_delta));
>                scmnd->host_scribble = NULL;
>                scmnd->scsi_done(scmnd);
> -               srp_remove_req(target, req);
>        }
> -
> -       spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
>  }
>
(Continue reading)

Dan Carpenter | 3 Jan 2011 06:48
Picon

[patch] [SCSI] scsi_dh: potential null dereference in scsi_dh_activate()

We assumed "sdev" could be NULL ealier, so lets check it here as well.

Signed-off-by: Dan Carpenter <error27 <at> gmail.com>

diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
index b837c5b..ff340e3 100644
--- a/drivers/scsi/device_handler/scsi_dh.c
+++ b/drivers/scsi/device_handler/scsi_dh.c
 <at>  <at>  -446,7 +446,7  <at>  <at>  int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data)
 	    sdev->sdev_state == SDEV_CANCEL ||
 	    sdev->sdev_state == SDEV_DEL)
 		err = SCSI_DH_NOSYS;
-	if (sdev->sdev_state == SDEV_OFFLINE)
+	if (sdev && sdev->sdev_state == SDEV_OFFLINE)
 		err = SCSI_DH_DEV_OFFLINED;
 	spin_unlock_irqrestore(q->queue_lock, flags);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Tejun Heo | 3 Jan 2011 14:49

[PATCH 17/32] scsi/ibmvstgt: use system_wq instead of vtgtd workqueue

The target driver is not in the memory reclaim path and doesn't need a
dedicated workqueue.  Drop vtgtd and use system_wq instead.  The used
work item is sync flushed on removal.

Signed-off-by: Tejun Heo <tj <at> kernel.org>
Cc: FUJITA Tomonori <fujita.tomonori <at> lab.ntt.co.jp>
Cc: "James E.J. Bottomley" <James.Bottomley <at> HansenPartnership.com>
Cc: linux-scsi <at> vger.kernel.org
---
Only compile tested.  Please feel free to take it into the subsystem
tree or simply ack - I'll route it through the wq tree.

Thanks.

 drivers/scsi/ibmvscsi/ibmvstgt.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index 2256bab..47fc632 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
 <at>  <at>  -74,7 +74,6  <at>  <at>  struct vio_port {
 	struct srp_rport *rport;
 };

-static struct workqueue_struct *vtgtd;
 static struct scsi_transport_template *ibmvstgt_transport_template;

 /*
 <at>  <at>  -546,7 +545,7  <at>  <at>  static irqreturn_t ibmvstgt_interrupt(int dummy, void *data)
(Continue reading)


Gmane