-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't work to XQD card #5
Comments
What model of card reader is it? Can you send me the output of "lspci" |
Thank you for your help!
1, The PCI-e card reader I bought is here: https://www.amazon.com/Ableconn-PEX-CF106-Express-Adapter-CFexpress/dp/B07NP2ZQD5/ref=sr_1_2?keywords=CFexpress&qid=1570598792&sr=8-2
2, The XQD card I used for testing is a Lexar 64GB XQD card
3, I added this pci device id to your source code:
static struct pci_device_id ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_SONY, PCI_DEVICE_ID_SXS_81CE), },
{ PCI_DEVICE(PCI_VENDOR_ID_SONY, PCI_DEVICE_ID_SXS_905C), },
{ PCI_DEVICE(PCI_VENDOR_ID_SONY, PCI_DEVICE_ID_SXS_90BC), },
{ 0, }
};
4, I added a few pr_err() to function sxs_memory_read() to output debug info:
status = readl(dev->mmio+SXS_STATUS_REG);
data[0] = cpu_to_le32(0x00010028);
data[1] = cpu_to_le32(sector & 0xffffffff);
data[2] = 0x0;
data[3] = cpu_to_le32(nsect & 0xffffffff);
memcpy_toio(dev->mmio, data, sizeof(data));
writel(0xa0, dev->mmio+SXS_ENABLE_REG);
writel(0x80, dev->mmio+SXS_CONTROL_REG);
if (!wait_for_completion_timeout(&dev->irq_response,
msecs_to_jiffies(5000))) {
dev_dbg(&pdev->dev, "No IRQ\n");
pr_err("sxs_memcpy_read: No IRQ (cmd=0x10028)!\n");
}
and
writel(dma3_handle & 0xffffffff, dev->mmio+SXS_MASTER_LINK_REG_L);
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
writel(dma3_handle >> 32, dev->mmio+SXS_MASTER_LINK_REG_H);
#else
writel(0, dev->mmio+SXS_MASTER_LINK_REG_H);
#endif
writel(0x20, dev->mmio+SXS_CONTROL_REG);
if (!wait_for_completion_timeout(&dev->irq_response,
msecs_to_jiffies(5000))) {
dev_dbg(&pdev->dev, "No IRQ\n");
pr_err("sxs_memcpy_read: No IRQ (dma3_handle)!\n");
}
4, When I type 'insmod sxs.ko', I got following debug info:
$ insmod /mnt/sxs.ko
[ 32.308545] sxs_probe: device=90bch
[ 32.312604] sxs_probe: pci_enable_device()...
[ 32.317567] sxs_probe: pci_enable_msi()...
[ 32.322506] sxs_probe: pci_set_dma_mask()...
[ 32.327344] sxs_probe: pci_request_regions()...
[ 32.332607] sxs_probe: pci_ioremap_bar()...
[ 32.337307] sxs_probe: pci_set_master()...
[ 32.342073] sxs_probe: pci_set_drvdata()...
[ 32.346756] sxs_probe: request_irq()...
[ 32.351156] sxs_probe: sxs_boot_check()...
[ 32.355662] sxs_probe: sxs_setup_card()...
[ 32.360426] sxs_probe: sxs_get_size()...
[ 32.364946] sxs_get_size:sector size=2048, num_sectors: 32047104
[ 32.371653] sxs_probe: sxs_setup_disk()...
[ 32.376240] sxs_setup_disk: register_blkdev() ...
[ 32.381567] sxs_setup_disk: blk_alloc_queue() ...
[ 32.386776] sxs_setup_disk: blk_queue_make_request() ...
[ 32.392790] sxs_setup_disk: blk_queue_bounce_limit() ...
[ 32.398617] sxs_setup_disk: blk_queue_logical_block_size() ...
[ 32.405223] sxs_setup_disk: alloc_disk(4) ...
[ 32.410097] sxs_setup_disk: set_capacity(num_512_sectors=128188416) ...
[ 32.417357] sxs_setup_disk: add_disk() ...
[ 32.422261] sxs_open: bd_disk->disk_name: sxs, major=252
[ 32.428138] sxs_memcpy_read64: sector=0, nsect=2
[ 32.433830] sxs_memcpy_read: boot-signature 0
[ 32.438636] sxs_memcpy_read64: sector=2, nsect=2
[ 37.440051] sxs_memcpy_read: No IRQ (dma3_handle)!
[ 37.445417] sxs_memcpy_read: boot-signature 0
[ 37.450485] sxs_memcpy_read64: sector=6, nsect=2
[ 42.450051] sxs_memcpy_read: No IRQ (10028)!
[ 47.450051] sxs_memcpy_read: No IRQ (dma3_handle)!
[ 47.455407] sxs_memcpy_read: boot-signature 0
[ 47.460849] sxs_setup_disk: ret=0
[ 47.464525] sxs_probe: sxs driver successfully loaded
The error message were "No IRQ". I noticed that the there is no error message 'No IRQ(10028)' at the first time.
Appreciate!
Luke
…------------------ Original ------------------
From: "Kieran Kunhya"<[email protected]>;
Date: Wed, Oct 30, 2019 08:37 PM
To: "kierank/sxs-linux"<[email protected]>;
Cc: "LuKang"<[email protected]>;"Author"<[email protected]>;
Subject: Re: [kierank/sxs-linux] Can't work to XQD card (#5)
What model of card reader is it? Can you send me the output of "lspci"
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any way to enable this driver for XQD card? I bought an XQD PCI-e add-on card. It works on Windows 10 with Sony XQD device driver. But this Linux driver will not work to XQD card.
The text was updated successfully, but these errors were encountered: