/* bad_rw_intr() now tries to be a bit smarter and does things according to the error returned by the controller. -Mika Liljeberg ( */
static void bad_rw_intr(void)
/* bad_rw_intr() now tries to be a bit smarter and does things according to the error returned by the controller. -Mika Liljeberg ( */
static void bad_rw_intr(void)
{
	struct request *req = hd_req;
	if (req != NULL) {
		struct hd_i_struct *disk = req->rq_disk->private_data;
		if (++req->errors >= MAX_ERRORS || (hd_error & BBD_ERR)) {
			hd_end_request_cur(-EIO);
			disk->special_op = disk->recalibrate = 1;
		} else if (req->errors % RESET_FREQ == 0)
			reset = 1;
		else if ((hd_error & TRK0_ERR) || req->errors % RECAL_FREQ == 0)
			disk->special_op = disk->recalibrate = 1;
	}
}