Skip to content

Commit bce159d

Browse files
committed
Merge tag 'for-5.8/drivers-2020-06-01' of git://git.kernel.dk/linux-block
Pull block driver updates from Jens Axboe: "On top of the core changes, here are the block driver changes for this merge window: - NVMe changes: - NVMe over Fibre Channel protocol updates, which also reach over to drivers/scsi/lpfc (James Smart) - namespace revalidation support on the target (Anthony Iliopoulos) - gcc zero length array fix (Arnd Bergmann) - nvmet cleanups (Chaitanya Kulkarni) - misc cleanups and fixes (me, Keith Busch, Sagi Grimberg) - use a SRQ per completion vector (Max Gurtovoy) - fix handling of runtime changes to the queue count (Weiping Zhang) - t10 protection information support for nvme-rdma and nvmet-rdma (Israel Rukshin and Max Gurtovoy) - target side AEN improvements (Chaitanya Kulkarni) - various fixes and minor improvements all over, icluding the nvme part of the lpfc driver" - Floppy code cleanup series (Willy, Denis) - Floppy contention fix (Jiri) - Loop CONFIGURE support (Martijn) - bcache fixes/improvements (Coly, Joe, Colin) - q->queuedata cleanups (Christoph) - Get rid of ioctl_by_bdev (Christoph, Stefan) - md/raid5 allocation fixes (Coly) - zero length array fixes (Gustavo) - swim3 task state fix (Xu)" * tag 'for-5.8/drivers-2020-06-01' of git://git.kernel.dk/linux-block: (166 commits) bcache: configure the asynchronous registertion to be experimental bcache: asynchronous devices registration bcache: fix refcount underflow in bcache_device_free() bcache: Convert pr_<level> uses to a more typical style bcache: remove redundant variables i and n lpfc: Fix return value in __lpfc_nvme_ls_abort lpfc: fix axchg pointer reference after free and double frees lpfc: Fix pointer checks and comments in LS receive refactoring nvme: set dma alignment to qword nvmet: cleanups the loop in nvmet_async_events_process nvmet: fix memory leak when removing namespaces and controllers concurrently nvmet-rdma: add metadata/T10-PI support nvmet: add metadata support for block devices nvmet: add metadata/T10-PI support nvme: add Metadata Capabilities enumerations nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len nvmet: rename nvmet_rw_len to nvmet_rw_data_len nvmet: add metadata characteristics for a namespace nvme-rdma: add metadata/T10-PI support nvme-rdma: introduce nvme_rdma_sgl structure ...
2 parents 750a02a + 0c8d3fc commit bce159d

Some content is hidden

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

81 files changed

+5429
-2353
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14711,6 +14711,7 @@ S: Supported
1471114711
W: http://www.ibm.com/developerworks/linux/linux390/
1471214712
F: block/partitions/ibm.c
1471314713
F: drivers/s390/block/dasd*
14714+
F: include/linux/dasd_mod.h
1471414715

1471514716
S390 IOMMU (PCI)
1471614717
M: Gerald Schaefer <[email protected]>

arch/alpha/include/asm/floppy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#define __ASM_ALPHA_FLOPPY_H
1212

1313

14-
#define fd_inb(port) inb_p(port)
15-
#define fd_outb(value,port) outb_p(value,port)
14+
#define fd_inb(base, reg) inb_p((base) + (reg))
15+
#define fd_outb(value, base, reg) outb_p(value, (base) + (reg))
1616

1717
#define fd_enable_dma() enable_dma(FLOPPY_DMA)
1818
#define fd_disable_dma() disable_dma(FLOPPY_DMA)

arch/arm/include/asm/floppy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
#ifndef __ASM_ARM_FLOPPY_H
1010
#define __ASM_ARM_FLOPPY_H
1111

12-
#define fd_outb(val,port) \
12+
#define fd_outb(val, base, reg) \
1313
do { \
1414
int new_val = (val); \
15-
if (((port) & 7) == FD_DOR) { \
15+
if ((reg) == FD_DOR) { \
1616
if (new_val & 0xf0) \
1717
new_val = (new_val & 0x0c) | \
1818
floppy_selects[new_val & 3]; \
1919
else \
2020
new_val &= 0x0c; \
2121
} \
22-
outb(new_val, (port)); \
22+
outb(new_val, (base) + (reg)); \
2323
} while(0)
2424

25-
#define fd_inb(port) inb((port))
25+
#define fd_inb(base, reg) inb((base) + (reg))
2626
#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
2727
0,"floppy",NULL)
2828
#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)

arch/m68k/include/asm/floppy.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ static __inline__ void release_dma_lock(unsigned long flags)
6363
}
6464

6565

66-
static __inline__ unsigned char fd_inb(int port)
66+
static __inline__ unsigned char fd_inb(int base, int reg)
6767
{
6868
if(MACH_IS_Q40)
69-
return inb_p(port);
69+
return inb_p(base + reg);
7070
else if(MACH_IS_SUN3X)
71-
return sun3x_82072_fd_inb(port);
71+
return sun3x_82072_fd_inb(base + reg);
7272
return 0;
7373
}
7474

75-
static __inline__ void fd_outb(unsigned char value, int port)
75+
static __inline__ void fd_outb(unsigned char value, int base, int reg)
7676
{
7777
if(MACH_IS_Q40)
78-
outb_p(value, port);
78+
outb_p(value, base + reg);
7979
else if(MACH_IS_SUN3X)
80-
sun3x_82072_fd_outb(value, port);
80+
sun3x_82072_fd_outb(value, base + reg);
8181
}
8282

8383

@@ -211,26 +211,27 @@ asmlinkage irqreturn_t floppy_hardint(int irq, void *dev_id)
211211
st=1;
212212
for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
213213
lcount; lcount--, lptr++) {
214-
st=inb(virtual_dma_port+4) & 0xa0 ;
215-
if(st != 0xa0)
214+
st = inb(virtual_dma_port + FD_STATUS);
215+
st &= STATUS_DMA | STATUS_READY;
216+
if (st != (STATUS_DMA | STATUS_READY))
216217
break;
217218
if(virtual_dma_mode)
218-
outb_p(*lptr, virtual_dma_port+5);
219+
outb_p(*lptr, virtual_dma_port + FD_DATA);
219220
else
220-
*lptr = inb_p(virtual_dma_port+5);
221+
*lptr = inb_p(virtual_dma_port + FD_DATA);
221222
}
222223

223224
virtual_dma_count = lcount;
224225
virtual_dma_addr = lptr;
225-
st = inb(virtual_dma_port+4);
226+
st = inb(virtual_dma_port + FD_STATUS);
226227
}
227228

228229
#ifdef TRACE_FLPY_INT
229230
calls++;
230231
#endif
231-
if(st == 0x20)
232+
if (st == STATUS_DMA)
232233
return IRQ_HANDLED;
233-
if(!(st & 0x20)) {
234+
if (!(st & STATUS_DMA)) {
234235
virtual_dma_residue += virtual_dma_count;
235236
virtual_dma_count=0;
236237
#ifdef TRACE_FLPY_INT

arch/mips/include/asm/mach-generic/floppy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
/*
2727
* How to access the FDC's registers.
2828
*/
29-
static inline unsigned char fd_inb(unsigned int port)
29+
static inline unsigned char fd_inb(unsigned int base, unsigned int reg)
3030
{
31-
return inb_p(port);
31+
return inb_p(base + reg);
3232
}
3333

34-
static inline void fd_outb(unsigned char value, unsigned int port)
34+
static inline void fd_outb(unsigned char value, unsigned int base, unsigned int reg)
3535
{
36-
outb_p(value, port);
36+
outb_p(value, base + reg);
3737
}
3838

3939
/*

arch/mips/include/asm/mach-jazz/floppy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
#include <asm/jazzdma.h>
1818
#include <asm/pgtable.h>
1919

20-
static inline unsigned char fd_inb(unsigned int port)
20+
static inline unsigned char fd_inb(unsigned int base, unsigned int reg)
2121
{
2222
unsigned char c;
2323

24-
c = *(volatile unsigned char *) port;
24+
c = *(volatile unsigned char *) (base + reg);
2525
udelay(1);
2626

2727
return c;
2828
}
2929

30-
static inline void fd_outb(unsigned char value, unsigned int port)
30+
static inline void fd_outb(unsigned char value, unsigned int base, unsigned int reg)
3131
{
32-
*(volatile unsigned char *) port = value;
32+
*(volatile unsigned char *) (base + reg) = value;
3333
}
3434

3535
/*

arch/parisc/include/asm/floppy.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#define CSW fd_routine[can_use_virtual_dma & 1]
3030

3131

32-
#define fd_inb(port) readb(port)
33-
#define fd_outb(value, port) writeb(value, port)
32+
#define fd_inb(base, reg) readb((base) + (reg))
33+
#define fd_outb(value, base, reg) writeb(value, (base) + (reg))
3434

3535
#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy")
3636
#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
@@ -75,27 +75,28 @@ static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
7575
register char *lptr = virtual_dma_addr;
7676

7777
for (lcount = virtual_dma_count; lcount; lcount--) {
78-
st = fd_inb(virtual_dma_port+4) & 0xa0 ;
79-
if (st != 0xa0)
78+
st = fd_inb(virtual_dma_port, FD_STATUS);
79+
st &= STATUS_DMA | STATUS_READY;
80+
if (st != (STATUS_DMA | STATUS_READY))
8081
break;
8182
if (virtual_dma_mode) {
82-
fd_outb(*lptr, virtual_dma_port+5);
83+
fd_outb(*lptr, virtual_dma_port, FD_DATA);
8384
} else {
84-
*lptr = fd_inb(virtual_dma_port+5);
85+
*lptr = fd_inb(virtual_dma_port, FD_DATA);
8586
}
8687
lptr++;
8788
}
8889
virtual_dma_count = lcount;
8990
virtual_dma_addr = lptr;
90-
st = fd_inb(virtual_dma_port+4);
91+
st = fd_inb(virtual_dma_port, FD_STATUS);
9192
}
9293

9394
#ifdef TRACE_FLPY_INT
9495
calls++;
9596
#endif
96-
if (st == 0x20)
97+
if (st == STATUS_DMA)
9798
return;
98-
if (!(st & 0x20)) {
99+
if (!(st & STATUS_DMA)) {
99100
virtual_dma_residue += virtual_dma_count;
100101
virtual_dma_count = 0;
101102
#ifdef TRACE_FLPY_INT

arch/powerpc/include/asm/floppy.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
#include <asm/machdep.h>
1515

16-
#define fd_inb(port) inb_p(port)
17-
#define fd_outb(value,port) outb_p(value,port)
16+
#define fd_inb(base, reg) inb_p((base) + (reg))
17+
#define fd_outb(value, base, reg) outb_p(value, (base) + (reg))
1818

1919
#define fd_enable_dma() enable_dma(FLOPPY_DMA)
2020
#define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA)
@@ -61,21 +61,22 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id)
6161
st = 1;
6262
for (lcount=virtual_dma_count, lptr=virtual_dma_addr;
6363
lcount; lcount--, lptr++) {
64-
st=inb(virtual_dma_port+4) & 0xa0 ;
65-
if (st != 0xa0)
64+
st = inb(virtual_dma_port + FD_STATUS);
65+
st &= STATUS_DMA | STATUS_READY;
66+
if (st != (STATUS_DMA | STATUS_READY))
6667
break;
6768
if (virtual_dma_mode)
68-
outb_p(*lptr, virtual_dma_port+5);
69+
outb_p(*lptr, virtual_dma_port + FD_DATA);
6970
else
70-
*lptr = inb_p(virtual_dma_port+5);
71+
*lptr = inb_p(virtual_dma_port + FD_DATA);
7172
}
7273
virtual_dma_count = lcount;
7374
virtual_dma_addr = lptr;
74-
st = inb(virtual_dma_port+4);
75+
st = inb(virtual_dma_port + FD_STATUS);
7576

76-
if (st == 0x20)
77+
if (st == STATUS_DMA)
7778
return IRQ_HANDLED;
78-
if (!(st & 0x20)) {
79+
if (!(st & STATUS_DMA)) {
7980
virtual_dma_residue += virtual_dma_count;
8081
virtual_dma_count=0;
8182
doing_vdma = 0;

arch/sparc/include/asm/floppy_32.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ struct sun_floppy_ops {
5959

6060
static struct sun_floppy_ops sun_fdops;
6161

62-
#define fd_inb(port) sun_fdops.fd_inb(port)
63-
#define fd_outb(value,port) sun_fdops.fd_outb(value,port)
62+
#define fd_inb(base, reg) sun_fdops.fd_inb(reg)
63+
#define fd_outb(value, base, reg) sun_fdops.fd_outb(value, reg)
6464
#define fd_enable_dma() sun_fd_enable_dma()
6565
#define fd_disable_dma() sun_fd_disable_dma()
6666
#define fd_request_dma() (0) /* nothing... */
@@ -114,15 +114,15 @@ static unsigned char sun_read_dir(void)
114114
static unsigned char sun_82072_fd_inb(int port)
115115
{
116116
udelay(5);
117-
switch(port & 7) {
117+
switch (port) {
118118
default:
119119
printk("floppy: Asked to read unknown port %d\n", port);
120120
panic("floppy: Port bolixed.");
121-
case 4: /* FD_STATUS */
121+
case FD_STATUS:
122122
return sun_fdc->status_82072 & ~STATUS_DMA;
123-
case 5: /* FD_DATA */
123+
case FD_DATA:
124124
return sun_fdc->data_82072;
125-
case 7: /* FD_DIR */
125+
case FD_DIR:
126126
return sun_read_dir();
127127
}
128128
panic("sun_82072_fd_inb: How did I get here?");
@@ -131,20 +131,20 @@ static unsigned char sun_82072_fd_inb(int port)
131131
static void sun_82072_fd_outb(unsigned char value, int port)
132132
{
133133
udelay(5);
134-
switch(port & 7) {
134+
switch (port) {
135135
default:
136136
printk("floppy: Asked to write to unknown port %d\n", port);
137137
panic("floppy: Port bolixed.");
138-
case 2: /* FD_DOR */
138+
case FD_DOR:
139139
sun_set_dor(value, 0);
140140
break;
141-
case 5: /* FD_DATA */
141+
case FD_DATA:
142142
sun_fdc->data_82072 = value;
143143
break;
144-
case 7: /* FD_DCR */
144+
case FD_DCR:
145145
sun_fdc->dcr_82072 = value;
146146
break;
147-
case 4: /* FD_STATUS */
147+
case FD_DSR:
148148
sun_fdc->status_82072 = value;
149149
break;
150150
}
@@ -154,23 +154,23 @@ static void sun_82072_fd_outb(unsigned char value, int port)
154154
static unsigned char sun_82077_fd_inb(int port)
155155
{
156156
udelay(5);
157-
switch(port & 7) {
157+
switch (port) {
158158
default:
159159
printk("floppy: Asked to read unknown port %d\n", port);
160160
panic("floppy: Port bolixed.");
161-
case 0: /* FD_STATUS_0 */
161+
case FD_SRA:
162162
return sun_fdc->status1_82077;
163-
case 1: /* FD_STATUS_1 */
163+
case FD_SRB:
164164
return sun_fdc->status2_82077;
165-
case 2: /* FD_DOR */
165+
case FD_DOR:
166166
return sun_fdc->dor_82077;
167-
case 3: /* FD_TDR */
167+
case FD_TDR:
168168
return sun_fdc->tapectl_82077;
169-
case 4: /* FD_STATUS */
169+
case FD_STATUS:
170170
return sun_fdc->status_82077 & ~STATUS_DMA;
171-
case 5: /* FD_DATA */
171+
case FD_DATA:
172172
return sun_fdc->data_82077;
173-
case 7: /* FD_DIR */
173+
case FD_DIR:
174174
return sun_read_dir();
175175
}
176176
panic("sun_82077_fd_inb: How did I get here?");
@@ -179,23 +179,23 @@ static unsigned char sun_82077_fd_inb(int port)
179179
static void sun_82077_fd_outb(unsigned char value, int port)
180180
{
181181
udelay(5);
182-
switch(port & 7) {
182+
switch (port) {
183183
default:
184184
printk("floppy: Asked to write to unknown port %d\n", port);
185185
panic("floppy: Port bolixed.");
186-
case 2: /* FD_DOR */
186+
case FD_DOR:
187187
sun_set_dor(value, 1);
188188
break;
189-
case 5: /* FD_DATA */
189+
case FD_DATA:
190190
sun_fdc->data_82077 = value;
191191
break;
192-
case 7: /* FD_DCR */
192+
case FD_DCR:
193193
sun_fdc->dcr_82077 = value;
194194
break;
195-
case 4: /* FD_STATUS */
195+
case FD_DSR:
196196
sun_fdc->status_82077 = value;
197197
break;
198-
case 3: /* FD_TDR */
198+
case FD_TDR:
199199
sun_fdc->tapectl_82077 = value;
200200
break;
201201
}

0 commit comments

Comments
 (0)