mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
sdio: set the functions' block size
Before a driver is probed, set the function's block size to the default so the driver is sure the block size is something sensible and it needn't explicitly set it. The default block size is the largest that's supported by both the card and the host, with a maximum of 512 to ensure aribitrarily sized transfer use the optimal (least) number of commands. See http://lkml.org/lkml/2007/8/7/150 for reasons for the block size choice. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
7616ee95f2
commit
9a08f82b3c
4 changed files with 63 additions and 2 deletions
|
@ -43,7 +43,8 @@ struct sdio_func {
|
|||
unsigned short vendor; /* vendor id */
|
||||
unsigned short device; /* device id */
|
||||
|
||||
unsigned short blksize; /* maximum block size */
|
||||
unsigned max_blksize; /* maximum block size */
|
||||
unsigned cur_blksize; /* current block size */
|
||||
|
||||
unsigned int state; /* function state */
|
||||
#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
|
||||
|
@ -111,6 +112,8 @@ extern void sdio_release_host(struct sdio_func *func);
|
|||
extern int sdio_enable_func(struct sdio_func *func);
|
||||
extern int sdio_disable_func(struct sdio_func *func);
|
||||
|
||||
extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz);
|
||||
|
||||
extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
|
||||
extern int sdio_release_irq(struct sdio_func *func);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue