FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-31-2011, 03:51 AM
Keng-Yu Lin
 
Default UBUNTU: SAUCE: (drop after 2.6.39) staging: rts_pstor: delete a function

From: wwang <wei_wang@realsil.com.cn>

Delete a function named rtsx_transfer_sglist which won't be called.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

BugLink: http://bugs.launchpad.net/bugs/698006
(cherry picked from commit 7eb90a3682fc42c5607cff931e5d0f6a9d52dc03)

Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
---
drivers/staging/rts_pstor/rtsx_transport.c | 136 ----------------------------
1 files changed, 0 insertions(+), 136 deletions(-)

diff --git a/drivers/staging/rts_pstor/rtsx_transport.c b/drivers/staging/rts_pstor/rtsx_transport.c
index e581f15..3b160dc 100644
--- a/drivers/staging/rts_pstor/rtsx_transport.c
+++ b/drivers/staging/rts_pstor/rtsx_transport.c
@@ -715,142 +715,6 @@ out:
return err;
}

-int rtsx_transfer_sglist(struct rtsx_chip *chip, u8 card,
- struct scatterlist *sg, int num_sg,
- enum dma_data_direction dma_dir, int timeout)
-{
- struct rtsx_dev *rtsx = chip->rtsx;
- struct completion trans_done;
- u8 dir;
- int buf_cnt, i;
- int err = 0;
- long timeleft;
-
- if ((sg == NULL) || (num_sg <= 0))
- return -EIO;
-
- if (dma_dir == DMA_TO_DEVICE) {
- dir = HOST_TO_DEVICE;
- } else if (dma_dir == DMA_FROM_DEVICE) {
- dir = DEVICE_TO_HOST;
- } else {
- return -ENXIO;
- }
-
- if (card == SD_CARD) {
- rtsx->check_card_cd = SD_EXIST;
- } else if (card == MS_CARD) {
- rtsx->check_card_cd = MS_EXIST;
- } else if (card == XD_CARD) {
- rtsx->check_card_cd = XD_EXIST;
- } else {
- rtsx->check_card_cd = 0;
- }
-
- spin_lock_irq(&rtsx->reg_lock);
-
- /* set up data structures for the wakeup system */
- rtsx->done = &trans_done;
-
- rtsx->trans_state = STATE_TRANS_SG;
- rtsx->trans_result = TRANS_NOT_READY;
-
- spin_unlock_irq(&rtsx->reg_lock);
-
- buf_cnt = dma_map_sg(&(rtsx->pci->dev), sg, num_sg, dma_dir);
-
- for (i = 0; i < buf_cnt; i++) {
- u32 bier = 0;
- u32 val = (1 << 31);
- dma_addr_t addr = sg_dma_address(sg + i);
- unsigned int len = sg_dma_len(sg + i);
-
- RTSX_DEBUGP("dma_addr = 0x%x, dma_len = %d
",
- (unsigned int)addr, len);
-
- val |= (u32)(dir & 0x01) << 29;
- val |= (u32)(len & 0x00FFFFFF);
-
- spin_lock_irq(&rtsx->reg_lock);
-
- init_completion(&trans_done);
-
- if (i == (buf_cnt - 1)) {
- /* If last transfer, disable data interrupt */
- bier = rtsx_readl(chip, RTSX_BIER);
- rtsx_writel(chip, RTSX_BIER, bier & 0xBFFFFFFF);
- }
-
- rtsx_writel(chip, RTSX_HDBAR, addr);
- rtsx_writel(chip, RTSX_HDBCTLR, val);
-
- spin_unlock_irq(&rtsx->reg_lock);
-
- timeleft = wait_for_completion_interruptible_timeout(
- &trans_done, timeout * HZ / 1000);
- if (timeleft <= 0) {
- RTSX_DEBUGP("Timeout (%s %d)
", __func__, __LINE__);
- RTSX_DEBUGP("chip->int_reg = 0x%x
", chip->int_reg);
- err = -ETIMEDOUT;
- if (i == (buf_cnt - 1))
- rtsx_writel(chip, RTSX_BIER, bier);
- goto out;
- }
-
- spin_lock_irq(&rtsx->reg_lock);
- if (rtsx->trans_result == TRANS_RESULT_FAIL) {
- err = -EIO;
- spin_unlock_irq(&rtsx->reg_lock);
- if (i == (buf_cnt - 1))
- rtsx_writel(chip, RTSX_BIER, bier);
- goto out;
- }
- spin_unlock_irq(&rtsx->reg_lock);
-
- if (i == (buf_cnt - 1)) {
- /* If last transfer, enable data interrupt
- * after transfer finished
- */
- rtsx_writel(chip, RTSX_BIER, bier);
- }
- }
-
- /* Wait for TRANS_OK_INT */
- spin_lock_irq(&rtsx->reg_lock);
- if (rtsx->trans_result == TRANS_NOT_READY) {
- init_completion(&trans_done);
- spin_unlock_irq(&rtsx->reg_lock);
- timeleft = wait_for_completion_interruptible_timeout(
- &trans_done, timeout * HZ / 1000);
- if (timeleft <= 0) {
- RTSX_DEBUGP("Timeout (%s %d)
", __func__, __LINE__);
- RTSX_DEBUGP("chip->int_reg = 0x%x
", chip->int_reg);
- err = -ETIMEDOUT;
- goto out;
- }
- } else {
- spin_unlock_irq(&rtsx->reg_lock);
- }
-
- spin_lock_irq(&rtsx->reg_lock);
- if (rtsx->trans_result == TRANS_RESULT_FAIL) {
- err = -EIO;
- } else if (rtsx->trans_result == TRANS_RESULT_OK) {
- err = 0;
- }
- spin_unlock_irq(&rtsx->reg_lock);
-
-out:
- rtsx->done = NULL;
- rtsx->trans_state = STATE_TRANS_NONE;
- dma_unmap_sg(&(rtsx->pci->dev), sg, num_sg, dma_dir);
-
- if (err < 0)
- rtsx_stop_cmd(chip, card);
-
- return err;
-}
-
int rtsx_transfer_data_partial(struct rtsx_chip *chip, u8 card,
void *buf, size_t len, int use_sg, unsigned int *index,
unsigned int *offset, enum dma_data_direction dma_dir,
--
1.7.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org