Skip to content

Commit

Permalink
decode KMCU z_ident correctly
Browse files Browse the repository at this point in the history
BUG: sync DMA_FROMDEVICE, even when cpu flush
	modified:   acq-fiber-hba.c
	modified:   afhba_stream_drv.c
	deleted:    mtd-utils
  • Loading branch information
petermilne committed Sep 19, 2016
1 parent 4c4e6a6 commit fa00575
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion acq-fiber-hba.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ int afhba_mtca_probe(struct AFHBA_DEV *adev)
{
int (*_init)(struct AFHBA_DEV* adev) = afhba4_stream? STREAM: NOSTREAM;

dev_info(pdev(adev), "AFHBA404 detected");
dev_info(pdev(adev), "AFHBA404 detected %s", afhba4_stream? "STREAM": "NOSTREAM");
adev->map_count = MAP_COUNT_4G1;
adev->remote_com_bar = MAP_COUNT_4G1-1;
if (bad_bios_bar_limit){
Expand Down
13 changes: 10 additions & 3 deletions afhba_stream_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include <linux/version.h>

#define REVID "1010"
#define REVID "1011"

#define DEF_BUFFER_LEN 0x100000

Expand Down Expand Up @@ -476,6 +476,14 @@ static int is_valid_z_ident(unsigned z_ident, char buf[], int maxbuf)
snprintf(buf, maxbuf, "acq2106_%03d.comms%X",
z_ident&0x0ffff, (z_ident&0x00f00000)>>20);
return 1;
}else if ((z_ident&0xe4330000) == 0xe4330000){
snprintf(buf, maxbuf, "kmcu_%03d.comms%x",
z_ident&0x0ffff, (z_ident&0x00f00000)>>20);
return 1;
}else if ((z_ident&0x43000000) == 0x43000000){
snprintf(buf, maxbuf, "kmcu_%03d.comms%x",
z_ident&0x0ffff, 0);
return 1;
}else{
return 0;
}
Expand Down Expand Up @@ -581,8 +589,7 @@ static void mark_empty(struct device *dev, struct HostBuffer *hb){
pmark[0] = EMPTY1;
pmark[1] = EMPTY2;

/* direction may be wrong - we're trying to flush */
dma_sync_single_for_device(dev, hb->pa, hb->req_len, PCI_DMA_TODEVICE);
dma_sync_single_for_device(dev, hb->pa, hb->req_len, PCI_DMA_FROMDEVICE);
}


Expand Down
1 change: 0 additions & 1 deletion mtd-utils
Submodule mtd-utils deleted from ed2777

0 comments on commit fa00575

Please sign in to comment.