Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
block.c File Reference
#include <linux/moduleparam.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/hdreg.h>
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/string_helpers.h>
#include <linux/delay.h>
#include <linux/capability.h>
#include <linux/compat.h>
#include <linux/mmc/ioctl.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/sd.h>
#include <asm/uaccess.h>
#include "queue.h"

Go to the source code of this file.

Data Structures

struct  mmc_blk_data
 
struct  mmc_blk_ioc_data
 

Macros

#define MODULE_PARAM_PREFIX   "mmcblk."
 
#define INAND_CMD38_ARG_EXT_CSD   113
 
#define INAND_CMD38_ARG_ERASE   0x00
 
#define INAND_CMD38_ARG_TRIM   0x01
 
#define INAND_CMD38_ARG_SECERASE   0x80
 
#define INAND_CMD38_ARG_SECTRIM1   0x81
 
#define INAND_CMD38_ARG_SECTRIM2   0x88
 
#define MMC_BLK_CMD23   (1 << 0) /* Can do SET_BLOCK_COUNT for multiblock */
 
#define MMC_BLK_REL_WR   (1 << 1) /* MMC Reliable write support */
 
#define MMC_BLK_READ   BIT(0)
 
#define MMC_BLK_WRITE   BIT(1)
 
#define MMC_BLK_DISCARD   BIT(2)
 
#define MMC_BLK_SECDISCARD   BIT(3)
 
#define ERR_NOMEDIUM   3
 
#define ERR_RETRY   2
 
#define ERR_ABORT   1
 
#define ERR_CONTINUE   0
 
#define CMD_ERRORS
 
#define CID_MANFID_SANDISK   0x2
 
#define CID_MANFID_TOSHIBA   0x11
 
#define CID_MANFID_MICRON   0x13
 
#define CID_MANFID_SAMSUNG   0x15
 
#define mmc_blk_suspend   NULL
 
#define mmc_blk_resume   NULL
 

Enumerations

enum  mmc_blk_status {
  MMC_BLK_SUCCESS = 0, MMC_BLK_PARTIAL, MMC_BLK_CMD_ERR, MMC_BLK_RETRY,
  MMC_BLK_ABORT, MMC_BLK_DATA_ERR, MMC_BLK_ECC_ERR, MMC_BLK_NOMEDIUM
}
 

Functions

 MODULE_ALIAS ("mmc:block")
 
 module_param (perdev_minors, int, 0444)
 
 MODULE_PARM_DESC (perdev_minors,"Minors numbers to allocate per device")
 
 module_init (mmc_blk_init)
 
 module_exit (mmc_blk_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Multimedia Card (MMC) block device driver")
 

Macro Definition Documentation

#define CID_MANFID_MICRON   0x13

Definition at line 1719 of file block.c.

#define CID_MANFID_SAMSUNG   0x15

Definition at line 1720 of file block.c.

#define CID_MANFID_SANDISK   0x2

Definition at line 1717 of file block.c.

#define CID_MANFID_TOSHIBA   0x11

Definition at line 1718 of file block.c.

#define CMD_ERRORS
Value:
(R1_OUT_OF_RANGE | /* Command argument out of range */ \
R1_ADDRESS_ERROR | /* Misaligned address */ \
R1_BLOCK_LEN_ERROR | /* Transferred block length incorrect */\
R1_WP_VIOLATION | /* Tried to write to protected block */ \
R1_CC_ERROR | /* Card controller error */ \
R1_ERROR) /* General/unknown error */

Definition at line 978 of file block.c.

#define ERR_ABORT   1

Definition at line 633 of file block.c.

#define ERR_CONTINUE   0

Definition at line 634 of file block.c.

#define ERR_NOMEDIUM   3

Definition at line 631 of file block.c.

#define ERR_RETRY   2

Definition at line 632 of file block.c.

#define INAND_CMD38_ARG_ERASE   0x00

Definition at line 55 of file block.c.

#define INAND_CMD38_ARG_EXT_CSD   113

Definition at line 54 of file block.c.

#define INAND_CMD38_ARG_SECERASE   0x80

Definition at line 57 of file block.c.

#define INAND_CMD38_ARG_SECTRIM1   0x81

Definition at line 58 of file block.c.

#define INAND_CMD38_ARG_SECTRIM2   0x88

Definition at line 59 of file block.c.

#define INAND_CMD38_ARG_TRIM   0x01

Definition at line 56 of file block.c.

#define MMC_BLK_CMD23   (1 << 0) /* Can do SET_BLOCK_COUNT for multiblock */

Definition at line 89 of file block.c.

#define MMC_BLK_DISCARD   BIT(2)

Definition at line 99 of file block.c.

#define MMC_BLK_READ   BIT(0)

Definition at line 97 of file block.c.

#define MMC_BLK_REL_WR   (1 << 1) /* MMC Reliable write support */

Definition at line 90 of file block.c.

#define mmc_blk_resume   NULL

Definition at line 1871 of file block.c.

#define MMC_BLK_SECDISCARD   BIT(3)

Definition at line 100 of file block.c.

#define mmc_blk_suspend   NULL

Definition at line 1870 of file block.c.

#define MMC_BLK_WRITE   BIT(1)

Definition at line 98 of file block.c.

#define MODULE_PARAM_PREFIX   "mmcblk."

Definition at line 52 of file block.c.

Enumeration Type Documentation

Enumerator:
MMC_BLK_SUCCESS 
MMC_BLK_PARTIAL 
MMC_BLK_CMD_ERR 
MMC_BLK_RETRY 
MMC_BLK_ABORT 
MMC_BLK_DATA_ERR 
MMC_BLK_ECC_ERR 
MMC_BLK_NOMEDIUM 

Definition at line 115 of file block.c.

Function Documentation

MODULE_ALIAS ( "mmc:block"  )
MODULE_DESCRIPTION ( "Multimedia Card (MMC) block device driver )
module_exit ( mmc_blk_exit  )
module_init ( mmc_blk_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( perdev_minors  ,
int  ,
0444   
)
MODULE_PARM_DESC ( perdev_minors  ,
"Minors numbers to allocate per device  
)