Skip to content

Commit 19ac97f

Browse files
James BottomleyJames Bottomley
authored andcommitted
Merge remote-tracking branch 'scsi-queue/drivers-for-3.18' into for-linus
2 parents 24c20f1 + e785060 commit 19ac97f

131 files changed

Lines changed: 10337 additions & 3001 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,50 @@ Required properties:
88
- interrupts : <interrupt mapping for UFS host controller IRQ>
99
- reg : <registers mapping>
1010

11+
Optional properties:
12+
- vdd-hba-supply : phandle to UFS host controller supply regulator node
13+
- vcc-supply : phandle to VCC supply regulator node
14+
- vccq-supply : phandle to VCCQ supply regulator node
15+
- vccq2-supply : phandle to VCCQ2 supply regulator node
16+
- vcc-supply-1p8 : For embedded UFS devices, valid VCC range is 1.7-1.95V
17+
or 2.7-3.6V. This boolean property when set, specifies
18+
to use low voltage range of 1.7-1.95V. Note for external
19+
UFS cards this property is invalid and valid VCC range is
20+
always 2.7-3.6V.
21+
- vcc-max-microamp : specifies max. load that can be drawn from vcc supply
22+
- vccq-max-microamp : specifies max. load that can be drawn from vccq supply
23+
- vccq2-max-microamp : specifies max. load that can be drawn from vccq2 supply
24+
- <name>-fixed-regulator : boolean property specifying that <name>-supply is a fixed regulator
25+
26+
- clocks : List of phandle and clock specifier pairs
27+
- clock-names : List of clock input name strings sorted in the same
28+
order as the clocks property.
29+
- freq-table-hz : Array of <min max> operating frequencies stored in the same
30+
order as the clocks property. If this property is not
31+
defined or a value in the array is "0" then it is assumed
32+
that the frequency is set by the parent clock or a
33+
fixed rate clock source.
34+
35+
Note: If above properties are not defined it can be assumed that the supply
36+
regulators or clocks are always on.
37+
1138
Example:
1239
ufshc@0xfc598000 {
1340
compatible = "jedec,ufs-1.1";
1441
reg = <0xfc598000 0x800>;
1542
interrupts = <0 28 0>;
43+
44+
vdd-hba-supply = <&xxx_reg0>;
45+
vdd-hba-fixed-regulator;
46+
vcc-supply = <&xxx_reg1>;
47+
vcc-supply-1p8;
48+
vccq-supply = <&xxx_reg2>;
49+
vccq2-supply = <&xxx_reg3>;
50+
vcc-max-microamp = 500000;
51+
vccq-max-microamp = 200000;
52+
vccq2-max-microamp = 200000;
53+
54+
clocks = <&core 0>, <&ref 0>, <&iface 0>;
55+
clock-names = "core_clk", "ref_clk", "iface_clk";
56+
freq-table-hz = <100000000 200000000>, <0 0>, <0 0>;
1657
};

‎Documentation/scsi/ChangeLog.megaraid_sas‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
Release Date : Thu. Jun 19, 2014 17:00:00 PST 2014 -
2+
(emaild-id:megaraidlinux@lsi.com)
3+
Adam Radford
4+
Kashyap Desai
5+
Sumit Saxena
6+
Uday Lingala
7+
Current Version : 06.803.02.00-rc1
8+
Old Version : 06.803.01.00-rc1
9+
1. Fix reset_mutex leak in megasas_reset_fusion().
10+
2. Remove unused variables in megasas_instance.
11+
3. Fix LD/VF affiliation parsing.
12+
4. Add missing initial call to megasas_get_ld_vf_affiliation().
13+
5. Version and Changelog update.
14+
-------------------------------------------------------------------------------
115
Release Date : Mon. Mar 10, 2014 17:00:00 PST 2014 -
216
(emaild-id:megaraidlinux@lsi.com)
317
Adam Radford

‎drivers/message/fusion/mptbase.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,6 @@ mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp)
14001400
* @vendor: pci vendor id
14011401
* @device: pci device id
14021402
* @revision: pci revision id
1403-
* @prod_name: string returned
14041403
*
14051404
* Returns product string displayed when driver loads,
14061405
* in /proc/mpt/summary and /sysfs/class/scsi_host/host<X>/version_product
@@ -3172,12 +3171,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason)
31723171
facts->FWImageSize = le32_to_cpu(facts->FWImageSize);
31733172
}
31743173

3175-
sz = facts->FWImageSize;
3176-
if ( sz & 0x01 )
3177-
sz += 1;
3178-
if ( sz & 0x02 )
3179-
sz += 2;
3180-
facts->FWImageSize = sz;
3174+
facts->FWImageSize = ALIGN(facts->FWImageSize, 4);
31813175

31823176
if (!facts->RequestFrameSize) {
31833177
/* Something is wrong! */

‎drivers/message/fusion/mptctl.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,12 +1741,7 @@ mptctl_replace_fw (unsigned long arg)
17411741

17421742
/* Allocate memory for the new FW image
17431743
*/
1744-
newFwSize = karg.newImageSize;
1745-
1746-
if (newFwSize & 0x01)
1747-
newFwSize += 1;
1748-
if (newFwSize & 0x02)
1749-
newFwSize += 2;
1744+
newFwSize = ALIGN(karg.newImageSize, 4);
17501745

17511746
mpt_alloc_fw_memory(ioc, newFwSize);
17521747
if (ioc->cached_fw == NULL)

‎drivers/message/fusion/mptspi.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,11 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
14191419
goto out_mptspi_probe;
14201420
}
14211421

1422+
/* VMWare emulation doesn't properly implement WRITE_SAME
1423+
*/
1424+
if (pdev->subsystem_vendor == 0x15AD)
1425+
sh->no_write_same = 1;
1426+
14221427
spin_lock_irqsave(&ioc->FreeQlock, flags);
14231428

14241429
/* Attach the SCSI Host to the IOC structure

‎drivers/scsi/arcmsr/arcmsr.h‎

Lines changed: 134 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@
4545
#include <linux/interrupt.h>
4646
struct device_attribute;
4747
/*The limit of outstanding scsi command that firmware can handle*/
48-
#define ARCMSR_MAX_OUTSTANDING_CMD 256
4948
#ifdef CONFIG_XEN
5049
#define ARCMSR_MAX_FREECCB_NUM 160
50+
#define ARCMSR_MAX_OUTSTANDING_CMD 155
5151
#else
5252
#define ARCMSR_MAX_FREECCB_NUM 320
53+
#define ARCMSR_MAX_OUTSTANDING_CMD 255
5354
#endif
54-
#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2010/08/05"
55+
#define ARCMSR_DRIVER_VERSION "v1.30.00.04-20140919"
5556
#define ARCMSR_SCSI_INITIATOR_ID 255
5657
#define ARCMSR_MAX_XFER_SECTORS 512
5758
#define ARCMSR_MAX_XFER_SECTORS_B 4096
@@ -62,11 +63,17 @@ struct device_attribute;
6263
#define ARCMSR_MAX_QBUFFER 4096
6364
#define ARCMSR_DEFAULT_SG_ENTRIES 38
6465
#define ARCMSR_MAX_HBB_POSTQUEUE 264
66+
#define ARCMSR_MAX_ARC1214_POSTQUEUE 256
67+
#define ARCMSR_MAX_ARC1214_DONEQUEUE 257
6568
#define ARCMSR_MAX_XFER_LEN 0x26000 /* 152K */
6669
#define ARCMSR_CDB_SG_PAGE_LENGTH 256
70+
#define ARCMST_NUM_MSIX_VECTORS 4
6771
#ifndef PCI_DEVICE_ID_ARECA_1880
6872
#define PCI_DEVICE_ID_ARECA_1880 0x1880
6973
#endif
74+
#ifndef PCI_DEVICE_ID_ARECA_1214
75+
#define PCI_DEVICE_ID_ARECA_1214 0x1214
76+
#endif
7077
/*
7178
**********************************************************************************
7279
**
@@ -100,10 +107,11 @@ struct CMD_MESSAGE
100107
** IOP Message Transfer Data for user space
101108
*******************************************************************************
102109
*/
110+
#define ARCMSR_API_DATA_BUFLEN 1032
103111
struct CMD_MESSAGE_FIELD
104112
{
105113
struct CMD_MESSAGE cmdmessage;
106-
uint8_t messagedatabuffer[1032];
114+
uint8_t messagedatabuffer[ARCMSR_API_DATA_BUFLEN];
107115
};
108116
/* IOP message transfer */
109117
#define ARCMSR_MESSAGE_FAIL 0x0001
@@ -337,6 +345,56 @@ struct FIRMWARE_INFO
337345
#define ARCMSR_HBCMU_MESSAGE_FIRMWARE_OK 0x80000000
338346
/*
339347
*******************************************************************************
348+
** SPEC. for Areca Type D adapter
349+
*******************************************************************************
350+
*/
351+
#define ARCMSR_ARC1214_CHIP_ID 0x00004
352+
#define ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION 0x00008
353+
#define ARCMSR_ARC1214_I2_HOST_INTERRUPT_MASK 0x00034
354+
#define ARCMSR_ARC1214_SAMPLE_RESET 0x00100
355+
#define ARCMSR_ARC1214_RESET_REQUEST 0x00108
356+
#define ARCMSR_ARC1214_MAIN_INTERRUPT_STATUS 0x00200
357+
#define ARCMSR_ARC1214_PCIE_F0_INTERRUPT_ENABLE 0x0020C
358+
#define ARCMSR_ARC1214_INBOUND_MESSAGE0 0x00400
359+
#define ARCMSR_ARC1214_INBOUND_MESSAGE1 0x00404
360+
#define ARCMSR_ARC1214_OUTBOUND_MESSAGE0 0x00420
361+
#define ARCMSR_ARC1214_OUTBOUND_MESSAGE1 0x00424
362+
#define ARCMSR_ARC1214_INBOUND_DOORBELL 0x00460
363+
#define ARCMSR_ARC1214_OUTBOUND_DOORBELL 0x00480
364+
#define ARCMSR_ARC1214_OUTBOUND_DOORBELL_ENABLE 0x00484
365+
#define ARCMSR_ARC1214_INBOUND_LIST_BASE_LOW 0x01000
366+
#define ARCMSR_ARC1214_INBOUND_LIST_BASE_HIGH 0x01004
367+
#define ARCMSR_ARC1214_INBOUND_LIST_WRITE_POINTER 0x01018
368+
#define ARCMSR_ARC1214_OUTBOUND_LIST_BASE_LOW 0x01060
369+
#define ARCMSR_ARC1214_OUTBOUND_LIST_BASE_HIGH 0x01064
370+
#define ARCMSR_ARC1214_OUTBOUND_LIST_COPY_POINTER 0x0106C
371+
#define ARCMSR_ARC1214_OUTBOUND_LIST_READ_POINTER 0x01070
372+
#define ARCMSR_ARC1214_OUTBOUND_INTERRUPT_CAUSE 0x01088
373+
#define ARCMSR_ARC1214_OUTBOUND_INTERRUPT_ENABLE 0x0108C
374+
#define ARCMSR_ARC1214_MESSAGE_WBUFFER 0x02000
375+
#define ARCMSR_ARC1214_MESSAGE_RBUFFER 0x02100
376+
#define ARCMSR_ARC1214_MESSAGE_RWBUFFER 0x02200
377+
/* Host Interrupt Mask */
378+
#define ARCMSR_ARC1214_ALL_INT_ENABLE 0x00001010
379+
#define ARCMSR_ARC1214_ALL_INT_DISABLE 0x00000000
380+
/* Host Interrupt Status */
381+
#define ARCMSR_ARC1214_OUTBOUND_DOORBELL_ISR 0x00001000
382+
#define ARCMSR_ARC1214_OUTBOUND_POSTQUEUE_ISR 0x00000010
383+
/* DoorBell*/
384+
#define ARCMSR_ARC1214_DRV2IOP_DATA_IN_READY 0x00000001
385+
#define ARCMSR_ARC1214_DRV2IOP_DATA_OUT_READ 0x00000002
386+
/*inbound message 0 ready*/
387+
#define ARCMSR_ARC1214_IOP2DRV_DATA_WRITE_OK 0x00000001
388+
/*outbound DATA WRITE isr door bell clear*/
389+
#define ARCMSR_ARC1214_IOP2DRV_DATA_READ_OK 0x00000002
390+
/*outbound message 0 ready*/
391+
#define ARCMSR_ARC1214_IOP2DRV_MESSAGE_CMD_DONE 0x02000000
392+
/*outbound message cmd isr door bell clear*/
393+
/*ARCMSR_HBAMU_MESSAGE_FIRMWARE_OK*/
394+
#define ARCMSR_ARC1214_MESSAGE_FIRMWARE_OK 0x80000000
395+
#define ARCMSR_ARC1214_OUTBOUND_LIST_INTERRUPT_CLEAR 0x00000001
396+
/*
397+
*******************************************************************************
340398
** ARECA SCSI COMMAND DESCRIPTOR BLOCK size 0x1F8 (504)
341399
*******************************************************************************
342400
*/
@@ -357,7 +415,7 @@ struct ARCMSR_CDB
357415
#define ARCMSR_CDB_FLAG_ORDEREDQ 0x10
358416

359417
uint8_t msgPages;
360-
uint32_t Context;
418+
uint32_t msgContext;
361419
uint32_t DataLength;
362420
uint8_t Cdb[16];
363421
uint8_t DeviceStatus;
@@ -494,6 +552,56 @@ struct MessageUnit_C{
494552
uint32_t msgcode_rwbuffer[256]; /*2200 23FF*/
495553
};
496554
/*
555+
*********************************************************************
556+
** Messaging Unit (MU) of Type D processor
557+
*********************************************************************
558+
*/
559+
struct InBound_SRB {
560+
uint32_t addressLow; /* pointer to SRB block */
561+
uint32_t addressHigh;
562+
uint32_t length; /* in DWORDs */
563+
uint32_t reserved0;
564+
};
565+
566+
struct OutBound_SRB {
567+
uint32_t addressLow; /* pointer to SRB block */
568+
uint32_t addressHigh;
569+
};
570+
571+
struct MessageUnit_D {
572+
struct InBound_SRB post_qbuffer[ARCMSR_MAX_ARC1214_POSTQUEUE];
573+
volatile struct OutBound_SRB
574+
done_qbuffer[ARCMSR_MAX_ARC1214_DONEQUEUE];
575+
u16 postq_index;
576+
volatile u16 doneq_index;
577+
u32 __iomem *chip_id; /* 0x00004 */
578+
u32 __iomem *cpu_mem_config; /* 0x00008 */
579+
u32 __iomem *i2o_host_interrupt_mask; /* 0x00034 */
580+
u32 __iomem *sample_at_reset; /* 0x00100 */
581+
u32 __iomem *reset_request; /* 0x00108 */
582+
u32 __iomem *host_int_status; /* 0x00200 */
583+
u32 __iomem *pcief0_int_enable; /* 0x0020C */
584+
u32 __iomem *inbound_msgaddr0; /* 0x00400 */
585+
u32 __iomem *inbound_msgaddr1; /* 0x00404 */
586+
u32 __iomem *outbound_msgaddr0; /* 0x00420 */
587+
u32 __iomem *outbound_msgaddr1; /* 0x00424 */
588+
u32 __iomem *inbound_doorbell; /* 0x00460 */
589+
u32 __iomem *outbound_doorbell; /* 0x00480 */
590+
u32 __iomem *outbound_doorbell_enable; /* 0x00484 */
591+
u32 __iomem *inboundlist_base_low; /* 0x01000 */
592+
u32 __iomem *inboundlist_base_high; /* 0x01004 */
593+
u32 __iomem *inboundlist_write_pointer; /* 0x01018 */
594+
u32 __iomem *outboundlist_base_low; /* 0x01060 */
595+
u32 __iomem *outboundlist_base_high; /* 0x01064 */
596+
u32 __iomem *outboundlist_copy_pointer; /* 0x0106C */
597+
u32 __iomem *outboundlist_read_pointer; /* 0x01070 0x01072 */
598+
u32 __iomem *outboundlist_interrupt_cause; /* 0x1088 */
599+
u32 __iomem *outboundlist_interrupt_enable; /* 0x108C */
600+
u32 __iomem *message_wbuffer; /* 0x2000 */
601+
u32 __iomem *message_rbuffer; /* 0x2100 */
602+
u32 __iomem *msgcode_rwbuffer; /* 0x2200 */
603+
};
604+
/*
497605
*******************************************************************************
498606
** Adapter Control Block
499607
*******************************************************************************
@@ -505,19 +613,26 @@ struct AdapterControlBlock
505613
#define ACB_ADAPTER_TYPE_B 0x00000002 /* hbb M IOP */
506614
#define ACB_ADAPTER_TYPE_C 0x00000004 /* hbc P IOP */
507615
#define ACB_ADAPTER_TYPE_D 0x00000008 /* hbd A IOP */
616+
u32 roundup_ccbsize;
508617
struct pci_dev * pdev;
509618
struct Scsi_Host * host;
510619
unsigned long vir2phy_offset;
620+
struct msix_entry entries[ARCMST_NUM_MSIX_VECTORS];
511621
/* Offset is used in making arc cdb physical to virtual calculations */
512622
uint32_t outbound_int_enable;
513623
uint32_t cdb_phyaddr_hi32;
514624
uint32_t reg_mu_acc_handle0;
515625
spinlock_t eh_lock;
516626
spinlock_t ccblist_lock;
627+
spinlock_t postq_lock;
628+
spinlock_t doneq_lock;
629+
spinlock_t rqbuffer_lock;
630+
spinlock_t wqbuffer_lock;
517631
union {
518632
struct MessageUnit_A __iomem *pmuA;
519633
struct MessageUnit_B *pmuB;
520634
struct MessageUnit_C __iomem *pmuC;
635+
struct MessageUnit_D *pmuD;
521636
};
522637
/* message unit ATU inbound base address0 */
523638
void __iomem *mem_base0;
@@ -544,6 +659,8 @@ struct AdapterControlBlock
544659
/* iop init */
545660
#define ACB_F_ABORT 0x0200
546661
#define ACB_F_FIRMWARE_TRAP 0x0400
662+
#define ACB_F_MSI_ENABLED 0x1000
663+
#define ACB_F_MSIX_ENABLED 0x2000
547664
struct CommandControlBlock * pccb_pool[ARCMSR_MAX_FREECCB_NUM];
548665
/* used for memory free */
549666
struct list_head ccb_free_list;
@@ -557,19 +674,20 @@ struct AdapterControlBlock
557674
/* dma_coherent used for memory free */
558675
dma_addr_t dma_coherent_handle;
559676
/* dma_coherent_handle used for memory free */
560-
dma_addr_t dma_coherent_handle_hbb_mu;
677+
dma_addr_t dma_coherent_handle2;
678+
void *dma_coherent2;
561679
unsigned int uncache_size;
562680
uint8_t rqbuffer[ARCMSR_MAX_QBUFFER];
563681
/* data collection buffer for read from 80331 */
564-
int32_t rqbuf_firstindex;
682+
int32_t rqbuf_getIndex;
565683
/* first of read buffer */
566-
int32_t rqbuf_lastindex;
684+
int32_t rqbuf_putIndex;
567685
/* last of read buffer */
568686
uint8_t wqbuffer[ARCMSR_MAX_QBUFFER];
569687
/* data collection buffer for write to 80331 */
570-
int32_t wqbuf_firstindex;
688+
int32_t wqbuf_getIndex;
571689
/* first of write buffer */
572-
int32_t wqbuf_lastindex;
690+
int32_t wqbuf_putIndex;
573691
/* last of write buffer */
574692
uint8_t devstate[ARCMSR_MAX_TARGETID][ARCMSR_MAX_TARGETLUN];
575693
/* id0 ..... id15, lun0...lun7 */
@@ -594,6 +712,8 @@ struct AdapterControlBlock
594712
#define FW_DEADLOCK 0x0010
595713
atomic_t rq_map_token;
596714
atomic_t ante_token_value;
715+
uint32_t maxOutstanding;
716+
int msix_vector_count;
597717
};/* HW_DEVICE_EXTENSION */
598718
/*
599719
*******************************************************************************
@@ -606,7 +726,7 @@ struct CommandControlBlock{
606726
struct list_head list; /*x32: 8byte, x64: 16byte*/
607727
struct scsi_cmnd *pcmd; /*8 bytes pointer of linux scsi command */
608728
struct AdapterControlBlock *acb; /*x32: 4byte, x64: 8byte*/
609-
uint32_t cdb_phyaddr_pattern; /*x32: 4byte, x64: 4byte*/
729+
uint32_t cdb_phyaddr; /*x32: 4byte, x64: 4byte*/
610730
uint32_t arc_cdb_size; /*x32:4byte,x64:4byte*/
611731
uint16_t ccb_flags; /*x32: 2byte, x64: 2byte*/
612732
#define CCB_FLAG_READ 0x0000
@@ -684,8 +804,10 @@ struct SENSE_DATA
684804
#define ARCMSR_MU_OUTBOUND_MESSAGE0_INTMASKENABLE 0x01
685805
#define ARCMSR_MU_OUTBOUND_ALL_INTMASKENABLE 0x1F
686806

687-
extern void arcmsr_post_ioctldata2iop(struct AdapterControlBlock *);
688-
extern void arcmsr_iop_message_read(struct AdapterControlBlock *);
807+
extern void arcmsr_write_ioctldata2iop(struct AdapterControlBlock *);
808+
extern uint32_t arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *,
809+
struct QBUFFER __iomem *);
810+
extern void arcmsr_clear_iop2drv_rqueue_buffer(struct AdapterControlBlock *);
689811
extern struct QBUFFER __iomem *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *);
690812
extern struct device_attribute *arcmsr_host_attrs[];
691813
extern int arcmsr_alloc_sysfs_attr(struct AdapterControlBlock *);

0 commit comments

Comments
 (0)