Skip to content

Commit c70b529

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (84 commits) [SCSI] be2iscsi: SGE Len == 64K [SCSI] be2iscsi: Remove premature free of cid [SCSI] be2iscsi: More time for FW [SCSI] libsas: fix bug for vacant phy [SCSI] sd: Fix overflow with big physical blocks [SCSI] st: add MTWEOFI to write filemarks without flushing drive buffer [SCSI] libsas: Don't issue commands to devices that have been hot-removed [SCSI] megaraid_sas: Add Online Controller Reset to MegaRAID SAS drive [SCSI] lpfc 8.3.17: Update lpfc driver version to 8.3.17 [SCSI] lpfc 8.3.17: Replace function reset methodology [SCSI] lpfc 8.3.17: SCSI fixes [SCSI] lpfc 8.3.17: BSG fixes [SCSI] lpfc 8.3.17: SLI Additions and Fixes [SCSI] lpfc 8.3.17: Code Cleanup and Locking fixes [SCSI] zfcp: Remove scsi_cmnd->serial_number from debug traces [SCSI] ipr: fix array error logging [SCSI] aha152x: enable PCMCIA on 64bit [SCSI] scsi_dh_alua: Handle all states correctly [SCSI] cxgb4i: connection and ddp setting update [SCSI] cxgb3i: fixed connection over vlan ...
2 parents 80c226f + 58ff4bd commit c70b529

306 files changed

Lines changed: 39146 additions & 44940 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/scsi/st.txt‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
22
The driver is currently maintained by Kai Mäkisara (email
33
Kai.Makisara@kolumbus.fi)
44

5-
Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara
5+
Last modified: Sun Aug 29 18:25:47 2010 by kai.makisara
66

77

88
BASICS
@@ -85,6 +85,17 @@ writing and the last operation has been a write. Two filemarks can be
8585
optionally written. In both cases end of data is signified by
8686
returning zero bytes for two consecutive reads.
8787

88+
Writing filemarks without the immediate bit set in the SCSI command block acts
89+
as a synchronization point, i.e., all remaining data form the drive buffers is
90+
written to tape before the command returns. This makes sure that write errors
91+
are caught at that point, but this takes time. In some applications, several
92+
consecutive files must be written fast. The MTWEOFI operation can be used to
93+
write the filemarks without flushing the drive buffer. Writing filemark at
94+
close() is always flushing the drive buffers. However, if the previous
95+
operation is MTWEOFI, close() does not write a filemark. This can be used if
96+
the program wants to close/open the tape device between files and wants to
97+
skip waiting.
98+
8899
If rewind, offline, bsf, or seek is done and previous tape operation was
89100
write, a filemark is written before moving tape.
90101

@@ -301,6 +312,8 @@ MTBSR Space backward over count records.
301312
MTFSS Space forward over count setmarks.
302313
MTBSS Space backward over count setmarks.
303314
MTWEOF Write count filemarks.
315+
MTWEOFI Write count filemarks with immediate bit set (i.e., does not
316+
wait until data is on tape)
304317
MTWSM Write count setmarks.
305318
MTREW Rewind tape.
306319
MTOFFL Set device off line (often rewind plus eject).

‎drivers/message/fusion/mptbase.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5945,8 +5945,10 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
59455945
goto out;
59465946

59475947
mem = kmalloc(iocpage2sz, GFP_KERNEL);
5948-
if (!mem)
5948+
if (!mem) {
5949+
rc = -ENOMEM;
59495950
goto out;
5951+
}
59505952

59515953
memcpy(mem, (u8 *)pIoc2, iocpage2sz);
59525954
ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;

‎drivers/s390/scsi/Makefile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Makefile for the S/390 specific device drivers
33
#
44

5-
zfcp-objs := zfcp_aux.o zfcp_ccw.o zfcp_scsi.o zfcp_erp.o zfcp_qdio.o \
6-
zfcp_fsf.o zfcp_dbf.o zfcp_sysfs.o zfcp_fc.o zfcp_cfdc.o
5+
zfcp-objs := zfcp_aux.o zfcp_ccw.o zfcp_cfdc.o zfcp_dbf.o zfcp_erp.o \
6+
zfcp_fc.o zfcp_fsf.o zfcp_qdio.o zfcp_scsi.o zfcp_sysfs.o \
7+
zfcp_unit.o
78

89
obj-$(CONFIG_ZFCP) += zfcp.o

‎drivers/s390/scsi/zfcp_aux.c‎

Lines changed: 6 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun)
5656
struct ccw_device *cdev;
5757
struct zfcp_adapter *adapter;
5858
struct zfcp_port *port;
59-
struct zfcp_unit *unit;
6059

6160
cdev = get_ccwdev_by_busid(&zfcp_ccw_driver, busid);
6261
if (!cdev)
@@ -72,17 +71,11 @@ static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun)
7271
port = zfcp_get_port_by_wwpn(adapter, wwpn);
7372
if (!port)
7473
goto out_port;
74+
flush_work(&port->rport_work);
7575

76-
unit = zfcp_unit_enqueue(port, lun);
77-
if (IS_ERR(unit))
78-
goto out_unit;
79-
80-
zfcp_erp_unit_reopen(unit, 0, "auidc_1", NULL);
81-
zfcp_erp_wait(adapter);
82-
flush_work(&unit->scsi_work);
83-
84-
out_unit:
76+
zfcp_unit_add(port, lun);
8577
put_device(&port->dev);
78+
8679
out_port:
8780
zfcp_ccw_adapter_put(adapter);
8881
out_ccw_device:
@@ -158,6 +151,9 @@ static int __init zfcp_module_init(void)
158151
fc_attach_transport(&zfcp_transport_functions);
159152
if (!zfcp_data.scsi_transport_template)
160153
goto out_transport;
154+
scsi_transport_reserve_device(zfcp_data.scsi_transport_template,
155+
sizeof(struct zfcp_scsi_dev));
156+
161157

162158
retval = misc_register(&zfcp_cfdc_misc);
163159
if (retval) {
@@ -210,30 +206,6 @@ static void __exit zfcp_module_exit(void)
210206

211207
module_exit(zfcp_module_exit);
212208

213-
/**
214-
* zfcp_get_unit_by_lun - find unit in unit list of port by FCP LUN
215-
* @port: pointer to port to search for unit
216-
* @fcp_lun: FCP LUN to search for
217-
*
218-
* Returns: pointer to zfcp_unit or NULL
219-
*/
220-
struct zfcp_unit *zfcp_get_unit_by_lun(struct zfcp_port *port, u64 fcp_lun)
221-
{
222-
unsigned long flags;
223-
struct zfcp_unit *unit;
224-
225-
read_lock_irqsave(&port->unit_list_lock, flags);
226-
list_for_each_entry(unit, &port->unit_list, list)
227-
if (unit->fcp_lun == fcp_lun) {
228-
if (!get_device(&unit->dev))
229-
unit = NULL;
230-
read_unlock_irqrestore(&port->unit_list_lock, flags);
231-
return unit;
232-
}
233-
read_unlock_irqrestore(&port->unit_list_lock, flags);
234-
return NULL;
235-
}
236-
237209
/**
238210
* zfcp_get_port_by_wwpn - find port in port list of adapter by wwpn
239211
* @adapter: pointer to adapter to search for port
@@ -259,92 +231,6 @@ struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *adapter,
259231
return NULL;
260232
}
261233

262-
/**
263-
* zfcp_unit_release - dequeue unit
264-
* @dev: pointer to device
265-
*
266-
* waits until all work is done on unit and removes it then from the unit->list
267-
* of the associated port.
268-
*/
269-
static void zfcp_unit_release(struct device *dev)
270-
{
271-
struct zfcp_unit *unit = container_of(dev, struct zfcp_unit, dev);
272-
273-
put_device(&unit->port->dev);
274-
kfree(unit);
275-
}
276-
277-
/**
278-
* zfcp_unit_enqueue - enqueue unit to unit list of a port.
279-
* @port: pointer to port where unit is added
280-
* @fcp_lun: FCP LUN of unit to be enqueued
281-
* Returns: pointer to enqueued unit on success, ERR_PTR on error
282-
*
283-
* Sets up some unit internal structures and creates sysfs entry.
284-
*/
285-
struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun)
286-
{
287-
struct zfcp_unit *unit;
288-
int retval = -ENOMEM;
289-
290-
get_device(&port->dev);
291-
292-
unit = zfcp_get_unit_by_lun(port, fcp_lun);
293-
if (unit) {
294-
put_device(&unit->dev);
295-
retval = -EEXIST;
296-
goto err_out;
297-
}
298-
299-
unit = kzalloc(sizeof(struct zfcp_unit), GFP_KERNEL);
300-
if (!unit)
301-
goto err_out;
302-
303-
unit->port = port;
304-
unit->fcp_lun = fcp_lun;
305-
unit->dev.parent = &port->dev;
306-
unit->dev.release = zfcp_unit_release;
307-
308-
if (dev_set_name(&unit->dev, "0x%016llx",
309-
(unsigned long long) fcp_lun)) {
310-
kfree(unit);
311-
goto err_out;
312-
}
313-
retval = -EINVAL;
314-
315-
INIT_WORK(&unit->scsi_work, zfcp_scsi_scan_work);
316-
317-
spin_lock_init(&unit->latencies.lock);
318-
unit->latencies.write.channel.min = 0xFFFFFFFF;
319-
unit->latencies.write.fabric.min = 0xFFFFFFFF;
320-
unit->latencies.read.channel.min = 0xFFFFFFFF;
321-
unit->latencies.read.fabric.min = 0xFFFFFFFF;
322-
unit->latencies.cmd.channel.min = 0xFFFFFFFF;
323-
unit->latencies.cmd.fabric.min = 0xFFFFFFFF;
324-
325-
if (device_register(&unit->dev)) {
326-
put_device(&unit->dev);
327-
goto err_out;
328-
}
329-
330-
if (sysfs_create_group(&unit->dev.kobj, &zfcp_sysfs_unit_attrs))
331-
goto err_out_put;
332-
333-
write_lock_irq(&port->unit_list_lock);
334-
list_add_tail(&unit->list, &port->unit_list);
335-
write_unlock_irq(&port->unit_list_lock);
336-
337-
atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &unit->status);
338-
339-
return unit;
340-
341-
err_out_put:
342-
device_unregister(&unit->dev);
343-
err_out:
344-
put_device(&port->dev);
345-
return ERR_PTR(retval);
346-
}
347-
348234
static int zfcp_allocate_low_mem_buffers(struct zfcp_adapter *adapter)
349235
{
350236
adapter->pool.erp_req =

‎drivers/s390/scsi/zfcp_ccw.c‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ static int zfcp_ccw_activate(struct ccw_device *cdev)
4646
if (!adapter)
4747
return 0;
4848

49-
zfcp_erp_modify_adapter_status(adapter, "ccresu1", NULL,
50-
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
49+
zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING);
5150
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
5251
"ccresu2", NULL);
5352
zfcp_erp_wait(adapter);
@@ -164,14 +163,7 @@ static int zfcp_ccw_set_online(struct ccw_device *cdev)
164163
BUG_ON(!zfcp_reqlist_isempty(adapter->req_list));
165164
adapter->req_no = 0;
166165

167-
zfcp_erp_modify_adapter_status(adapter, "ccsonl1", NULL,
168-
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
169-
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
170-
"ccsonl2", NULL);
171-
zfcp_erp_wait(adapter);
172-
173-
flush_work(&adapter->scan_work);
174-
166+
zfcp_ccw_activate(cdev);
175167
zfcp_ccw_adapter_put(adapter);
176168
return 0;
177169
}
@@ -224,9 +216,8 @@ static int zfcp_ccw_notify(struct ccw_device *cdev, int event)
224216
break;
225217
case CIO_OPER:
226218
dev_info(&cdev->dev, "The FCP device is operational again\n");
227-
zfcp_erp_modify_adapter_status(adapter, "ccnoti3", NULL,
228-
ZFCP_STATUS_COMMON_RUNNING,
229-
ZFCP_SET);
219+
zfcp_erp_set_adapter_status(adapter,
220+
ZFCP_STATUS_COMMON_RUNNING);
230221
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
231222
"ccnoti4", NULL);
232223
break;

0 commit comments

Comments
 (0)