Codebase list fwupd / 7eeebae
vli-usbhub: Make erasing less verbose and writing more obvious Richard Hughes 4 years ago
1 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
555555 GError **error)
556556 {
557557 g_autoptr(GPtrArray) chunks = fu_chunk_array_new (NULL, sz, addr, 0x0, 0x1000);
558 g_debug ("erasing 0x%x bytes @0x%x", (guint) sz, addr);
558559 for (guint i = 0; i < chunks->len; i++) {
559560 FuChunk *chunk = g_ptr_array_index (chunks, i);
560 g_debug ("erasing @0x%x", chunk->address);
561 if (g_getenv ("FWUPD_VLI_USBHUB_VERBOSE") != NULL)
562 g_debug ("erasing @0x%x", chunk->address);
561563 if (!fu_vli_usbhub_device_erase_sector (self, chunk->address, error)) {
562564 g_prefix_error (error,
563565 "failed to erase FW sector @0x%x: ",
10851087 }
10861088
10871089 /* write */
1090 if (g_getenv ("FWUPD_VLI_USBHUB_VERBOSE") != NULL)
1091 g_debug ("writing 0x%x block @0x%x", (guint) bufsz, address);
10881092 if (!fu_vli_usbhub_device_spi_write_enable (self, error)) {
10891093 g_prefix_error (error, "enabling SPI write failed: ");
10901094 return FALSE;
11141118 g_autoptr(GPtrArray) chunks = NULL;
11151119
11161120 /* write SPI data, then CRC bytes last */
1121 g_debug ("writing 0x%x bytes @0x%x", (guint) bufsz, address);
11171122 chunks = fu_chunk_array_new (buf, bufsz, 0x0, 0x0, FU_VLI_USBHUB_TXSIZE);
11181123 if (chunks->len > 1) {
11191124 for (guint i = 1; i < chunks->len; i++) {