Thread (69 messages) 69 messages, 5 authors, 2019-08-09

Re: [PATCH v4 net-next 02/19] ionic: Add hardware init and device commands

From: Shannon Nelson <hidden>
Date: 2019-07-23 22:50:27

On 7/23/19 2:18 PM, David Miller wrote:
From: Shannon Nelson <redacted>
Date: Mon, 22 Jul 2019 14:40:06 -0700
quoted
+void ionic_init_devinfo(struct ionic_dev *idev)
+{
+	idev->dev_info.asic_type = ioread8(&idev->dev_info_regs->asic_type);
+	idev->dev_info.asic_rev = ioread8(&idev->dev_info_regs->asic_rev);
+
+	memcpy_fromio(idev->dev_info.fw_version,
+		      idev->dev_info_regs->fw_version,
+		      IONIC_DEVINFO_FWVERS_BUFLEN);
+
+	memcpy_fromio(idev->dev_info.serial_num,
+		      idev->dev_info_regs->serial_num,
+		      IONIC_DEVINFO_SERIAL_BUFLEN);
  ...
quoted
+	sig = ioread32(&idev->dev_info_regs->signature);
I think if you are going to use the io{read,write}{8,16,32,64}()
interfaces then you should use io{read,write}{8,16,32,64}_rep()
instead of memcpy_{to,from}io().
Sure.
sln
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help