Merge Linus' tree to be be to apply submitted patches to newer code than
current trivial.git base
This commit is contained in:
@@ -527,6 +527,7 @@ enum iscsi_err {
|
||||
ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
|
||||
ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20,
|
||||
ISCSI_ERR_SCSI_EH_SESSION_RST = ISCSI_ERR_BASE + 21,
|
||||
ISCSI_ERR_NOP_TIMEDOUT = ISCSI_ERR_BASE + 22,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
||||
*
|
||||
* Authors:
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
* Benny Halevy <bhalevy@panasas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2011
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
*
|
||||
* Public Declarations of the ORE API
|
||||
*
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
||||
*
|
||||
* Authors:
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
* Benny Halevy <bhalevy@panasas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -496,7 +496,7 @@ struct osd_timestamp {
|
||||
*/
|
||||
|
||||
struct osd_key_identifier {
|
||||
u8 id[7]; /* if you know why 7 please email bharrosh@panasas.com */
|
||||
u8 id[7]; /* if you know why 7 please email ooo@electrozaur.com */
|
||||
} __packed;
|
||||
|
||||
/* for osd_capability.format */
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
||||
*
|
||||
* Authors:
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
* Benny Halevy <bhalevy@panasas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
||||
*
|
||||
* Authors:
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
* Benny Halevy <bhalevy@panasas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008 Panasas Inc. All rights reserved.
|
||||
*
|
||||
* Authors:
|
||||
* Boaz Harrosh <bharrosh@panasas.com>
|
||||
* Boaz Harrosh <ooo@electrozaur.com>
|
||||
* Benny Halevy <bhalevy@panasas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@@ -31,7 +31,7 @@ enum scsi_timeouts {
|
||||
* Like SCSI_MAX_SG_SEGMENTS, but for archs that have sg chaining. This limit
|
||||
* is totally arbitrary, a setting of 2048 will get you at least 8mb ios.
|
||||
*/
|
||||
#ifdef ARCH_HAS_SG_CHAIN
|
||||
#ifdef CONFIG_ARCH_HAS_SG_CHAIN
|
||||
#define SCSI_MAX_SG_CHAIN_SEGMENTS 2048
|
||||
#else
|
||||
#define SCSI_MAX_SG_CHAIN_SEGMENTS SCSI_MAX_SG_SEGMENTS
|
||||
@@ -333,6 +333,7 @@ static inline int scsi_status_is_good(int status)
|
||||
#define TYPE_RBC 0x0e
|
||||
#define TYPE_OSD 0x11
|
||||
#define TYPE_ZBC 0x14
|
||||
#define TYPE_WLUN 0x1e /* well-known logical unit */
|
||||
#define TYPE_NO_LUN 0x7f
|
||||
|
||||
/* SCSI protocols; these are taken from SPC-3 section 7.5 */
|
||||
|
@@ -10,9 +10,10 @@
|
||||
#include <scsi/scsi_device.h>
|
||||
|
||||
struct Scsi_Host;
|
||||
struct scsi_device;
|
||||
struct scsi_driver;
|
||||
|
||||
#include <scsi/scsi_device.h>
|
||||
|
||||
/*
|
||||
* MAX_COMMAND_SIZE is:
|
||||
* The longest fixed-length SCSI CDB as per the SCSI standard.
|
||||
@@ -81,6 +82,7 @@ struct scsi_cmnd {
|
||||
|
||||
unsigned char prot_op;
|
||||
unsigned char prot_type;
|
||||
unsigned char prot_flags;
|
||||
|
||||
unsigned short cmd_len;
|
||||
enum dma_data_direction sc_data_direction;
|
||||
@@ -252,6 +254,14 @@ static inline unsigned char scsi_get_prot_op(struct scsi_cmnd *scmd)
|
||||
return scmd->prot_op;
|
||||
}
|
||||
|
||||
enum scsi_prot_flags {
|
||||
SCSI_PROT_TRANSFER_PI = 1 << 0,
|
||||
SCSI_PROT_GUARD_CHECK = 1 << 1,
|
||||
SCSI_PROT_REF_CHECK = 1 << 2,
|
||||
SCSI_PROT_REF_INCREMENT = 1 << 3,
|
||||
SCSI_PROT_IP_CHECKSUM = 1 << 4,
|
||||
};
|
||||
|
||||
/*
|
||||
* The controller usually does not know anything about the target it
|
||||
* is communicating with. However, when DIX is enabled the controller
|
||||
@@ -280,6 +290,17 @@ static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd)
|
||||
return blk_rq_pos(scmd->request);
|
||||
}
|
||||
|
||||
static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd)
|
||||
{
|
||||
return scmd->device->sector_size;
|
||||
}
|
||||
|
||||
static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd)
|
||||
{
|
||||
return blk_rq_pos(scmd->request) >>
|
||||
(ilog2(scsi_prot_interval(scmd)) - 9) & 0xffffffff;
|
||||
}
|
||||
|
||||
static inline unsigned scsi_prot_sg_count(struct scsi_cmnd *cmd)
|
||||
{
|
||||
return cmd->prot_sdb ? cmd->prot_sdb->table.nents : 0;
|
||||
@@ -316,17 +337,12 @@ static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
|
||||
static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)
|
||||
{
|
||||
unsigned int xfer_len = scsi_out(scmd)->length;
|
||||
unsigned int prot_op = scsi_get_prot_op(scmd);
|
||||
unsigned int sector_size = scmd->device->sector_size;
|
||||
unsigned int prot_interval = scsi_prot_interval(scmd);
|
||||
|
||||
switch (prot_op) {
|
||||
case SCSI_PROT_NORMAL:
|
||||
case SCSI_PROT_WRITE_STRIP:
|
||||
case SCSI_PROT_READ_INSERT:
|
||||
return xfer_len;
|
||||
}
|
||||
if (scmd->prot_flags & SCSI_PROT_TRANSFER_PI)
|
||||
xfer_len += (xfer_len >> ilog2(prot_interval)) * 8;
|
||||
|
||||
return xfer_len + (xfer_len >> ilog2(sector_size)) * 8;
|
||||
return xfer_len;
|
||||
}
|
||||
|
||||
#endif /* _SCSI_SCSI_CMND_H */
|
||||
|
@@ -174,6 +174,7 @@ struct scsi_device {
|
||||
unsigned wce_default_on:1; /* Cache is ON by default */
|
||||
unsigned no_dif:1; /* T10 PI (DIF) should be disabled */
|
||||
unsigned broken_fua:1; /* Don't set FUA bit */
|
||||
unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */
|
||||
|
||||
atomic_t disk_events_disable_depth; /* disable depth for disk events */
|
||||
|
||||
|
@@ -606,7 +606,7 @@ struct Scsi_Host {
|
||||
/*
|
||||
* These three parameters can be used to allow for wide scsi,
|
||||
* and for host adapters that support multiple busses
|
||||
* The first two should be set to 1 more than the actual max id
|
||||
* The last two should be set to 1 more than the actual max id
|
||||
* or lun (e.g. 8 for SCSI parallel systems).
|
||||
*/
|
||||
unsigned int max_channel;
|
||||
@@ -680,6 +680,7 @@ struct Scsi_Host {
|
||||
unsigned no_write_same:1;
|
||||
|
||||
unsigned use_blk_mq:1;
|
||||
unsigned use_cmd_list:1;
|
||||
|
||||
/*
|
||||
* Optional work queue to be utilized by the transport
|
||||
@@ -692,6 +693,9 @@ struct Scsi_Host {
|
||||
*/
|
||||
struct workqueue_struct *tmf_work_q;
|
||||
|
||||
/* The transport requires the LUN bits NOT to be stored in CDB[1] */
|
||||
unsigned no_scsi2_lun_in_cdb:1;
|
||||
|
||||
/*
|
||||
* Value host_blocked counts down from
|
||||
*/
|
||||
|
@@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
|
||||
if (!sdev->tagged_supported)
|
||||
return;
|
||||
|
||||
if (!shost_use_blk_mq(sdev->host) &&
|
||||
blk_queue_tagged(sdev->request_queue))
|
||||
if (shost_use_blk_mq(sdev->host))
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue);
|
||||
else if (!blk_queue_tagged(sdev->request_queue))
|
||||
blk_queue_init_tags(sdev->request_queue, depth,
|
||||
sdev->host->bqt);
|
||||
|
||||
@@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
|
||||
**/
|
||||
static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
|
||||
{
|
||||
if (!shost_use_blk_mq(sdev->host) &&
|
||||
blk_queue_tagged(sdev->request_queue))
|
||||
if (blk_queue_tagged(sdev->request_queue))
|
||||
blk_queue_free_tags(sdev->request_queue);
|
||||
scsi_adjust_queue_depth(sdev, 0, depth);
|
||||
}
|
||||
|
@@ -86,7 +86,9 @@ typedef struct sg_io_hdr
|
||||
#define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */
|
||||
#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */
|
||||
/* user space (debug indirect IO) */
|
||||
#define SG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */
|
||||
/* defaults:: for sg driver: Q_AT_HEAD; for block layer: Q_AT_TAIL */
|
||||
#define SG_FLAG_Q_AT_TAIL 0x10
|
||||
#define SG_FLAG_Q_AT_HEAD 0x20
|
||||
|
||||
/* following 'info' values are "or"-ed together */
|
||||
#define SG_INFO_OK_MASK 0x1
|
||||
|
Reference in New Issue
Block a user