memstick: automatically retrieve "INT" value from command response
MemoryStick storage cards, when in parallel mode, send several meaningful bits of their "INT" register as part of command response. This data is stored by host and can be used to spare invocation of "GET_INT" TPC on each data page transferred between host and card. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9df130392f
commit
ead7077360
@ -276,8 +276,6 @@ void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
|
||||
mrq->need_card_int = 1;
|
||||
else
|
||||
mrq->need_card_int = 0;
|
||||
|
||||
mrq->get_int_reg = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(memstick_init_req_sg);
|
||||
|
||||
@ -311,8 +309,6 @@ void memstick_init_req(struct memstick_request *mrq, unsigned char tpc,
|
||||
mrq->need_card_int = 1;
|
||||
else
|
||||
mrq->need_card_int = 0;
|
||||
|
||||
mrq->get_int_reg = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(memstick_init_req);
|
||||
|
||||
@ -342,6 +338,7 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
|
||||
card->id.class = id_reg.class;
|
||||
}
|
||||
complete(&card->mrq_complete);
|
||||
dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
|
||||
return -EAGAIN;
|
||||
}
|
||||
}
|
||||
@ -422,7 +419,6 @@ static void memstick_power_on(struct memstick_host *host)
|
||||
{
|
||||
host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON);
|
||||
host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_SERIAL);
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
static void memstick_check(struct work_struct *work)
|
||||
@ -579,7 +575,8 @@ EXPORT_SYMBOL(memstick_suspend_host);
|
||||
void memstick_resume_host(struct memstick_host *host)
|
||||
{
|
||||
mutex_lock(&host->lock);
|
||||
host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON);
|
||||
if (host->card)
|
||||
memstick_power_on(host);
|
||||
mutex_unlock(&host->lock);
|
||||
memstick_detect_change(host);
|
||||
}
|
||||
|
Reference in New Issue
Block a user