* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
*
- * $Revision: 1.10 $
*/
#include <linux/config.h>
int size;
/* Sanity checks */
- if ( magic == NULL || datasize > PAGE_SIZE ||
- (cplength*sizeof(struct ccw1)) > PAGE_SIZE)
- BUG();
- debug_text_event ( dasd_debug_area, 1, "ALLC");
- debug_text_event ( dasd_debug_area, 1, magic);
- debug_int_event ( dasd_debug_area, 1, cplength);
- debug_int_event ( dasd_debug_area, 1, datasize);
+ BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
+ (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
if (cplength > 0)
}
strncpy((char *) &cqr->magic, magic, 4);
ASCEBC((char *) &cqr->magic, 4);
- atomic_inc(&device->ref_count);
+ set_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
+ dasd_get_device(device);
return cqr;
}
{
unsigned long flags;
- if (cqr->dstat != NULL)
- kfree(cqr->dstat);
- debug_text_event(dasd_debug_area, 1, "FREE");
- debug_int_event(dasd_debug_area, 1, (long) cqr);
spin_lock_irqsave(&device->mem_lock, flags);
dasd_free_chunk(&device->erp_chunks, cqr);
spin_unlock_irqrestore(&device->mem_lock, flags);
DEV_MESSAGE (KERN_DEBUG, device,
"default ERP called (%i retries left)",
cqr->retries);
+ cqr->lpm = LPM_ANYPATH;
cqr->status = DASD_CQR_QUEUED;
} else {
DEV_MESSAGE (KERN_WARNING, device, "%s",
"default ERP called (NO retry left)");
-
cqr->status = DASD_CQR_FAILED;
cqr->stopclk = get_clock ();
}
struct dasd_device *device;
int success;
- if (cqr->refers == NULL || cqr->function == NULL)
- BUG();
+ BUG_ON(cqr->refers == NULL || cqr->function == NULL);
device = cqr->device;
success = cqr->status == DASD_CQR_DONE;