Linux Kernel
3.7.1
|
#include <linux/blkdev.h>
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include "debug.h"
#include "trace.h"
#include "rts51x.h"
#include "rts51x_transport.h"
#include "rts51x_scsi.h"
#include "rts51x_card.h"
#include "ms.h"
Go to the source code of this file.
Functions | |
int | mg_set_tpc_para_sub (struct rts51x_chip *chip, int type, u8 mg_entry_num) |
int | mg_set_leaf_id (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_get_local_EKB (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_chg (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_get_rsp_chg (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_rsp (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_get_ICV (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int | mg_set_ICV (struct scsi_cmnd *srb, struct rts51x_chip *chip) |
int mg_chg | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
int mg_get_ICV | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
After receiving this SCSI command, adapter shall read the divided data(1024 bytes totally) from medium by using READ_LONG_DATA TPC for 2 times, and report data to host with data-length is 1028 bytes.
Since the extra 4 bytes data is just only a prefix to original data that read from medium, so that the 4-byte data pushed into Ring buffer precedes data transmission from medium to Ring buffer by DMA mechanism in order to get maximum performance and minimum code size simultaneously.
int mg_get_local_EKB | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
int mg_get_rsp_chg | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
Send Response and Challenge data to host.
After receiving this SCSI command, adapter shall communicates with the medium, get parameters(HRd, Rms, MagicGateID) by using READ_SHORT_DATA TPC and send the data to host according to certain format required by MG-R specification. The paremeter MagicGateID is the one that adapter has obtained from the medium by TPC commands in Set Leaf ID command phase previously.
int mg_rsp | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
int mg_set_ICV | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
Send ICV data to medium.
After receiving this SCSI command, adapter shall receive 1028 bytes and write the later 1024 bytes to medium by WRITE_LONG_DATA TPC consecutively.
Since the first 4-bytes data is just only a prefix to original data that sent by host, and it should be skipped by shifting DMA pointer before writing 1024 bytes to medium.
int mg_set_leaf_id | ( | struct scsi_cmnd * | srb, |
struct rts51x_chip * | chip | ||
) |
Get MagciGate ID and set Leaf ID to medium.
After receiving this SCSI command, adapter shall fulfill 2 tasks below in order: